[Rseding91] Impossible to ban player.

Post Reply
User avatar
Cooldude2606
Inserter
Inserter
Posts: 27
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[Rseding91] Impossible to ban player.

Post by Cooldude2606 » Sat Dec 15, 2018 3:24 pm

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. Please contact me via our discord ---

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

Re: [Rseding91] Impossible to ban player.

Post by Oktokolo » Sat Dec 15, 2018 5:33 pm

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
Inserter
Inserter
Posts: 27
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Cooldude2606 » Mon Dec 17, 2018 10:29 pm

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. 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 » Tue Dec 18, 2018 12:10 pm

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: 8651
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] Impossible to ban player.

Post by Rseding91 » 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.
If you want to get ahold of me I'm almost always on Discord.

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

Re: [Rseding91] Impossible to ban player.

Post by Sergeant_Steve » Thu Dec 20, 2018 1:11 pm

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
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by grilledham » 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.

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

Re: [Rseding91] Impossible to ban player.

Post by Rseding91 » Wed Feb 27, 2019 11:45 pm

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
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [Rseding91] Impossible to ban player.

Post by grilledham » Thu Feb 28, 2019 12:08 pm

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. :)

Post Reply

Return to “Assigned”

Who is online

Users browsing this forum: No registered users and 1 guest