Updated Server Config/admin but no changes

ShadowHunturShadowHuntur Join Date: 2012-12-30 Member: 176785Members
Hi all,

I recently got a server up and running with a few friends. We bought it off GamingDeluxe (They have set it up and everything). However whenever I update the ServerAdmin.json and ServerConfig.json the server doesn't read these changes? I have restarted the server and such but to no avail.

I would also like to know how admins can kick players ingame, we tried the 'sv_kick' command with the console and the chat but neither worked. I'll upload the files that we think should work, I've done the formula for getting the NS2 steam id's working for admins.

We ideally want auto-balance enabled whenever the teams are unbalanced. I've been following the Wiki but like I said the server isn't recognising our changes.

ServerAdmin.json:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
    "groups":
    {
        "admin_group": { "type": "allowed", "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", "sv_password", "sv_unban", "sv_listbans", "cyclemap", "sv_changemap"  ] },  
    "mod_group" : { "type":  "allowed", "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", , "sv_unban", "sv_listbans", "cyclemap", "sv_changemap"  ] },  
    }
    
    "users":
    {
        "=SE= ShadowHuntur": { "id":99902053 , "groups": [ "admin_group" ] },
    }
}<!--c2--></div><!--ec2-->

ServerConfig.json:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
  "settings": {
    "rookie_friendly": true,
    "end_round_on_team_unbalance": 0.4,
    "auto_team_balance": {
      "enabled_after_seconds": 10,
      "enabled_on_unbalance_amount": 0
    }
  },
  "tags": [ "rookie" ]
}<!--c2--></div><!--ec2-->

Any help would be greatly appreciated! Thanks,

- ShadowHuntur

Comments

  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Have you checked your config_path setting is pointing to that location?

    I am unsure how bad the config parser is when dealing with bad formatting but the mod_group has a blank command or double "," and the end of the "mod_group" doesn't need a command because it's the last group. Then you should have a command after the group block etc...

    I have added an easy example in my Server Guide, you might want to just use the disallowed for the "admin_group" if you want unrestricted access it's just cleaner.
  • ShadowHunturShadowHuntur Join Date: 2012-12-30 Member: 176785Members
    I have had a look and it seems the config_path is going to the right place, however I can not check this out fully as I do not have full access to all the files on the server (I'm doing everything by TCAdmin). It may be possible that when the server was set-up by gaming deluxe they added in the wrong config path? I don't have access to the whole file system so I have no way of telling.

    I've sorted out all the bad formatting so there is no excuse now! Still doesn't work. Just to check, when your an admin on a server does your name come up in purple on the tab list? Also you can kick people while your in game with the console right? Cause that's ultimately what we want to be able to do.

    We've been throwing in the admin commands on the client side console, however they don't do anything! There is only one that works which is 'sv_status'.

    Again, any help is greatly appreciated. Thank you.

    - ShadowHuntur
  • teepsdonnellyteepsdonnelly Join Date: 2012-12-31 Member: 176879Members
    I believe the default config path is %APPDATA%/Natural Selection 2 -- If you hit your start button, and in the Run box, type exactly that and hit enter:

    %APPDATA%/Natural Selection 2

    That should open up the folder where you should be storing the json files.
  • A[L]CA[L]C Join Date: 2010-07-25 Member: 72801Members
    edited January 2013
    <!--quoteo(post=2054184:date=Jan 1 2013, 04:09 PM:name=teepsdonnelly)--><div class='quotetop'>QUOTE (teepsdonnelly @ Jan 1 2013, 04:09 PM) <a href="index.php?act=findpost&pid=2054184"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I believe the default config path is %APPDATA%/Natural Selection 2 -- If you hit your start button, and in the Run box, type exactly that and hit enter:

    %APPDATA%/Natural Selection 2

    That should open up the folder where you should be storing the json files.<!--QuoteEnd--></div><!--QuoteEEnd-->
    He can't because he doesnt have direct access to the server.

    I tried validating the json via <a href="http://jsoneditoronline.org/" target="_blank">http://jsoneditoronline.org/</a>

    however, your code errors:

    Error: Parse error on line 5:
    ...v_psay", "sv_slay", , "sv_unban", "sv_li
    -----------------------^
    Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got ','


    I tried editing it to:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
        "groups":
        {
            "admin_group": { "type": "allowed", "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", "sv_password", "sv_unban", "sv_listbans", "cyclemap", "sv_changemap" ] }
        }
        
        "users":
        {
            "=SE= ShadowHuntur": { "id":99902053 , "groups": [ "admin_group" ] },
        }
    }<!--c2--></div><!--ec2-->

    however this still errors

    Error: Parse error on line 5:
    ... ] } } "users": {
    --------------------^
    Expecting 'EOF', '}', ',', ']', got 'STRING'


    So I tried validating the example on the wiki.... and that errors too... BUT its the same error as my edit. Try that :)

    ServerConfig.json validates ok though.


    edit:

    I've edited my serveradmin file on my gamingdeluxe server and it's working fine, so definitely suggests a problem in your file.

    Here's mine.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
        "groups":
        {
            "admin_group": { "type": "allowed", "commands": [ "sv_ban", "sv_kick", "sv_switchteam", "sv_rrall", "sv_randomall", "sv_eject", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_tsay", "sv_psay", "sv_slay", "sv_password", "sv_unban", "sv_reset", "sv_listbans", "cyclemap", "sv_autobalance", "sv_changemap" ] }
        }
        
        "users":
        {
            "A[L]C": { "id": 143755, "groups": [ "admin_group" ] },
        }
    }<!--c2--></div><!--ec2-->
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    edited January 2013
    You have extra , in the config file.

    Copy and paste that and change map or restart server and it will work.


    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
        "groups":
        {
            "admin_group": { "type": "allowed", "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", "sv_password", "sv_unban", "sv_listbans", "cyclemap", "sv_changemap"  ] },  
        "mod_group" : { "type":  "allowed", "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", , "sv_unban", "sv_listbans", "cyclemap", "sv_changemap"  ] }
        }
        
        "users":
        {
            "=SE= ShadowHuntur": { "id":99902053 , "groups": [ "admin_group" ] }
        }
    }<!--c2--></div><!--ec2-->
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    so did my edits work?
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    edited January 2013
    Guys, you are both missing a "," after the groups section before "users" so the json validator is correct and as I mentioned before that double "," was incorrect. Which was picked up by the validator but CoTToN has added it back in?

    I just checked and the example on the Wiki is invalid because of the missing "," after the groups section.

    I'll update my server guide with a note.

    Here is what will probably work:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
        "groups":
        {
            "admin_group": {
                "type": "allowed",
                "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", "sv_password", "sv_unban", "sv_listbans", "cyclemap", "sv_changemap" ]
            },  
            "mod_group" : {
                "type": "allowed",
                "commands": [ "sv_ban", "sv_kick", "sv_help", "sv_status", "sv_statusip", "sv_say", "sv_psay", "sv_slay", "sv_unban", "sv_listbans", "cyclemap", "sv_changemap" ]
            }
        },
        "users":
        {
            "=SE= ShadowHuntur": {
                "id": 99902053,
                "groups": [ "admin_group" ]
            }
        }
    }<!--c2--></div><!--ec2-->

    I like to try and keep the formatting clean so you can see the code blocks easier, I would recommend doing this it will make your job easier.
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    thats not true since this is mine

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
        "groups":
        {
        "headadmin_group": { "type": "disallowed", "commands": [ ] },

        "mini_group": { "type": "allowed", "commands": [ "sv_kick", "sv_say", "sv_status", "sv_randomall", "sv_changemap", "sv_help", "sv_rrall", "sv_slay" ] },

            "admin_group": { "type": "disallowed", "commands": [ "sv_password", "sv_listbans", "sv_autobalance", "sv_unban", "sv_statusip" ] }
        }
        "users":
        {
        "Fast": { "id": 34188972, "groups": [ "headadmin_group" ] },
        "Soulz": { "id": 164208, "groups": [ "headadmin_group" ] },
            "CoTTon": { "id": 8078655, "groups": [ "headadmin_group" ] },
        "Bota49": { "id": 10546602, "groups": [ "headadmin_group" ] },

            "HeatSurge": { "id": 26900124, "groups": [ "admin_group" ] },
        "Farstar": { "id": 982681, "groups": [ "admin_group" ] },
        "FreedomFries13": { "id": 66982612, "groups": [ "admin_group" ] },
        "Wafflez": { "id": 4222243, "groups": [ "admin_group" ] },


        "Chickenbomb": { "id": 32616492, "groups": [ "admin_group" ] },
        "Matthew": { "id": 964769, "groups": [ "admin_group" ] },


        "Kezie": { "id": 2187932, "groups": [ "mini_group" ] },
        "Sword": { "id": 3894056, "groups": [ "mini_group" ] },
        "Narcosis": { "id": 5624186, "groups": [ "mini_group" ] },
        "MadJihad": { "id": 12003101, "groups": [ "mini_group" ] },
        "MrDropps": { "id": 529629, "groups": [ "mini_group" ] },
        "Angry Child": { "id": 39139263, "groups": [ "mini_group" ] },
        "Silent": { "id": 4599309, "groups": [ "mini_group" ] },

        "Decoy": { "id": 15097215, "groups": [ "mini_group" ] },
        "Priest": { "id": 205065, "groups": [ "mini_group" ] },
        "Cuddly": { "id": 16509028, "groups": [ "mini_group" ] }
        }
    }<!--c2--></div><!--ec2-->
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    edited January 2013
    Well you might be getting lucky or maybe NS2 is more relaxed on their validation.

    The default ServerAdmin.json that gets generated on first run is in this format:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
      "groups": {
        "mod_group": {
          "commands": [ "sv_reset", "sv_ban" ],
          "type": "allowed"
        },
        "admin_group": {
          "commands": [  ],
          "type": "disallowed"
        }
      },
      "users": {
        "NsPlayer": {
          "id": 10000001,
          "groups": [ "admin_group" ]
        }
      }
    }<!--c2--></div><!--ec2-->

    So it has the "," and if you check with the validation URL that was posted above with the "," it checks ok, without it fails.
  • CoTTonCoTTon Join Date: 2005-02-28 Member: 42773Members
    Brian, mind giving us a definitive answer
  • MurphyIdiotMurphyIdiot NS2 programmer Join Date: 2008-04-17 Member: 64095Members, Super Administrators, NS2 Developer, Subnautica Developer, Pistachionauts, Future Perfect Developer
    I am unsure why it isn't working for you but please check the log.txt file after starting your server up. That may have an error in there that will tell us what is wrong.

    My intuition is telling me that the server is not pointing to the correct location for these config files. Does it load the map cycle file correctly?
Sign In or Register to comment.