Updated Server Config/admin but no changes
ShadowHuntur
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
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
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.
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
%APPDATA%/Natural Selection 2
That should open up the folder where you should be storing the json files.
%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-->
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-->
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.
<!--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-->
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.
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?