[Rseding91] Impossible to ban player.

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Cooldude2606
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[Rseding91] Impossible to ban player.

Post by Cooldude2606 »

We had a griefer on our server, one of our moderators attempted to ban them via our custom webscript which failed; then their logged into the game and was still unable to, later that day one of our administators came online and found it was not possible to ban them via game.ban_player().

I then did some digging and found that even when using game.ban_player banning was not possible. Here are all inputs tried for PlayerSpecification:
  • "аграрный работяга" (the players name, after being copyied from the log file)
  • 120 (the players index at the time)
  • game.players[120] (the player userdata)
  • game.players[120].name (the player's name via userdata)
I belive that the error is due to there being a space in the name as this is what we get after attempting to ban the player:
Image
The second half of the players name as be prefixed to the reason and if no reason is included in the command then the second half becomes the reason:
Image
--- Developer for Explosive Gaming factorio community. Find our code on GitHub. Please contact me via our Discord. ---

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Oktokolo »

Another common pitfalls would be Unicode normalization differences between banlist, log and console input when doing binary comparisons. Wube should (and hopefully does already) normalize all the texts to Unicode Normal Form C as they enter the game.

User avatar
Cooldude2606
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Cooldude2606 »

We have just encountered another player with spaces in the name; so this is not just one name and not just with non latin letters.
Name: "ministerio del lag"
This player did nothing wrong and I am just putting this here in case spaces are the problem. I should mention that our server has require user verification enabled in case this point is brought up.
--- Developer for Explosive Gaming factorio community. Find our code on GitHub. Please contact me via our Discord. ---

Tairon96
Inserter
Inserter
Posts: 39
Joined: Sun Nov 18, 2018 6:38 am
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Tairon96 »

The handling of players by their names with Unicode characters is not a smart idea. For example there are several types of whitespace in Unicode. They all look the same. But for a comparison they are different.

It might be better to implement same kind of player ID. This number could be use to refer to a player if the reference by name failed.

The copy/paste of a player's name from a log is a sure method. But it is not very user-friendly : Since the first attempt without copy/paste might fail, the frustration is inevitably.
Radar : Damnit, we are surrounded! :o
Artillery : Great, now I can attack in every direction! :D
_
languages

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Rseding91 »

I'll fix the inability to ban players with spaces in their names via console. Also, in 0.17 there's a GUI you can ban players without knowing how to spell their name (it's a button press) so it will be doubly-solved for 0.17.
If you want to get ahold of me I'm almost always on Discord.

Sergeant_Steve
Inserter
Inserter
Posts: 22
Joined: Tue Jun 28, 2016 10:24 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Sergeant_Steve »

Tairon96 wrote:
Tue Dec 18, 2018 12:10 pm
It might be better to implement same kind of player ID. This number could be use to refer to a player if the reference by name failed.
There is already something like that built into the game, there is a "Player Index" which you can use to ban people without using the name, however even using that had the same problem as it only banned the name up to the first space between characters.

grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by grilledham »

Rseding91 wrote:
Tue Dec 18, 2018 8:48 pm
I'll fix the inability to ban players with spaces in their names via console. Also, in 0.17 there's a GUI you can ban players without knowing how to spell their name (it's a button press) so it will be doubly-solved for 0.17.
This still isn't fixed as of 0.17.2 for /ban or game.ban_player

Banning via console is important for my use case as I automatically synchronise bans across all my servers.

Thanks.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Rseding91 »

grilledham wrote:
Wed Feb 27, 2019 11:14 pm
Rseding91 wrote:
Tue Dec 18, 2018 8:48 pm
I'll fix the inability to ban players with spaces in their names via console. Also, in 0.17 there's a GUI you can ban players without knowing how to spell their name (it's a button press) so it will be doubly-solved for 0.17.
This still isn't fixed as of 0.17.2 for /ban or game.ban_player

Banning via console is important for my use case as I automatically synchronise bans across all my servers.

Thanks.
I know it isn't. Which is why it's still in assigned and not resolved problems and bugs :P
If you want to get ahold of me I'm almost always on Discord.

grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by grilledham »

OK. It struck me as odd that players with spaces can be banned via /admin but not via game.ban_player.

But as long as this is known, I'm happy to keep waiting patiently. :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Rseding91 »

So, after talking with the guy who manages the accounts he ended up finding that it wasn't meant to be allowing usernames with spaces/other invalid characters and forced all of the accounts to change their username.

Indirectly - I think that makes this obsolete?
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”