When manually adding bans through Web Admin tool the ban is not saving properly in BannedPlayers.jso

CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
edited December 2012 in Server Discussion
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

Comments

  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    edited December 2012
    Well

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

    ??!?!?
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Reproduced and reported. It seems to only do this if you ban after the player has left the server (banning while player is still in the server seems to work properly).

    Nice find.
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    Ah - that might explain it.

    Thanks
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    edited December 2012
    So for sure we cannot edit this file while the server running right?

    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
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Looks like the admin commands to convert the ID to a number before saving if it couldnt find the player.

    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.
  • MurphyIdiotMurphyIdiot NS2 programmer Join Date: 2008-04-17 Member: 64095Members, Super Administrators, NS2 Developer, Subnautica Developer, Pistachionauts, Future Perfect Developer
    I fixed this bug in 233.
Sign In or Register to comment.