bannedplayers.json not showing all bans on web interface

MavickMavick Join Date: 2012-11-07 Member: 168138Members
Not sure what the trigger is that's causing this, but I've noticed lately that not all of the bans in my bannedplayers.json are showing on the ban tab on the web interface. This has caused me some confusion in the past, as the web interface is generally the quickest, easiest way to look at bans.

Comments

  • FuhrerDarqueSydeFuhrerDarqueSyde Join Date: 2004-10-04 Member: 32076Members, Constellation
    I've only ever had this happen when I've banned someone but it hasn't changed maps yet.
  • MavickMavick Join Date: 2012-11-07 Member: 168138Members
    This seems to be persistent on mine, and it's not just waiting for a map change. Several times I've been asked about a ban days after it has happened, and I won't see it under the bans tab on web interface, but when I go look at the bannedplayers.json, it will be there.

    I also found out, the hard way, that if you alter the bannedplayers.json manually, while the server is running, that you will end up wiping your entire bannedplayers.json eventually. I believe it's most likely something to do with the fact that the web interface is also doing read/write from the file as well, and things go haywire when you make a change without using it on a running server.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    edited April 2013
    Can you pm me a copy of the json that is broken along with the ban(s) that are causing problems? I will try to give it a quick run through. I have a guess as to why this is happening, but need to confirm it.


    Edit: The only way I could reproduce was to have no reason specified for the ban. Would still be nice to have your ban list and ensure that is what is going on.

    In rcon.js (located ns2/web/js) you can add the following lines at line 172, just after the line that reads
    ban = data[i]
    

    if(!ban.reason){
    ban.reason = "None";
    }

    That should solve the problem. I will try to get it in the next patch.
  • MavickMavick Join Date: 2012-11-07 Member: 168138Members
    edited April 2013
    I wish I could, but as I stated, my banlist was wiped last week. I do have an old backup from back in Feb, but I'm not sure if it was doing it back then or not, wasn't aware of the problem until just a few weeks ago.

    I might give your idea a try tho. Would be odd, I'm pretty sure most of bans on my old list didn't have any reasons, but it was only a few bans that wouldn't show up.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    No a big deal, just wanted to make sure I was not missing an issue I hadn't seen while testing.

    It looks like Brian took care of it in the engine, so next patch should fix things and a ll your bans should appear. In the interim, you can add the above code to your rcon.js and things should work out until then.
Sign In or Register to comment.