When manually adding bans through Web Admin tool the ban is not saving properly in BannedPlayers.jso
CoTTon
Join Date: 2005-02-28 Member: 42773Members
When manually adding bans through Web Admin tool the ban is not saving properly in BannedPlayers.json
Steps to recreate:
1) Login to Web admin
2) Goto the Bans tab
3) Enter any numbers in the steam ID / time / reasons boxes
4) Click Add Ban
5) open Bannedplayers.json
You will see that in the file the ban you just created has " " between the numbers for steam ID
Because of this, it will not ban the person properly and instead still allow the person to rejoin the server if they are to rejoin.
EG:
[ {
"id": "1234564",
"time": 0,
"name": "Unknown",
"reason": "troll"
}, {
"id": "654321",
"time": 0,
"name": "Unknown",
"reason": "troll"
} ]
The correct format is
[ {
"id": 1234564,
"time": 0,
"name": "Unknown",
"reason": "troll"
}, {
"id": 654321,
"time": 0,
"name": "Unknown",
"reason": "troll"
} ]
However if a admin does do sv_ban in console or doing it in the players tab "Rcon Command" or ban the player as well from the players list it is fine as it is not adding the " "
So server admins - if you guys have banned people recently using the Ban tab - double check your Bannedplayers.json and make sure there is no " " for the steam ID's -
if there is " " - make sure you shut the server down first - then edit - then relaunch server.
<b>UWE: Please fix!</b>
Thanks
Steps to recreate:
1) Login to Web admin
2) Goto the Bans tab
3) Enter any numbers in the steam ID / time / reasons boxes
4) Click Add Ban
5) open Bannedplayers.json
You will see that in the file the ban you just created has " " between the numbers for steam ID
Because of this, it will not ban the person properly and instead still allow the person to rejoin the server if they are to rejoin.
EG:
[ {
"id": "1234564",
"time": 0,
"name": "Unknown",
"reason": "troll"
}, {
"id": "654321",
"time": 0,
"name": "Unknown",
"reason": "troll"
} ]
The correct format is
[ {
"id": 1234564,
"time": 0,
"name": "Unknown",
"reason": "troll"
}, {
"id": 654321,
"time": 0,
"name": "Unknown",
"reason": "troll"
} ]
However if a admin does do sv_ban in console or doing it in the players tab "Rcon Command" or ban the player as well from the players list it is fine as it is not adding the " "
So server admins - if you guys have banned people recently using the Ban tab - double check your Bannedplayers.json and make sure there is no " " for the steam ID's -
if there is " " - make sure you shut the server down first - then edit - then relaunch server.
<b>UWE: Please fix!</b>
Thanks
Comments
It seems that even with the sv_ban command in the players tab for "rcon command" or even in game admin it is adding " " as well...
??!?!?
Nice find.
Thanks
As per the wiki
" BannedPlayers.json
Important: Do not edit this file while the server is running. Your changes will be overwritten"
but why is that other Json files are ok eg serveradmin where it will take into effect after every map change
Regarding bans and editing the file when the server is running, if you edit the bans file but then ban someone in game, the ban you entered manually would be lost.