Help debug serveradmin.json

amckernamckern Join Date: 2003-03-03 Member: 14249Members, Constellation Posts: 971 Advanced user
edited January 2014 in Server Discussion
I am having trouble with executing server commands through the console when connected through the client, i have done a few Google searches, and suspect i have the syntax correct, but the wrong implantation

My Steam id is 0:0:48128 - so i would expect the line to read
"id": 96256,
.
.
.
Here is my full JSON
    {
      "groups": {
        "mod_group": {
          "commands": [ "sv_reset", "sv_ban" ],
          "type": "allowed"
        },
        "admin_group": { "type": "allowed", "commands": [
        "sv_listbans", "sv_ban", "sv_switchteam", "sv_changemap", "sv_reset", "sv_say",
        "sv_rrall", "sv_randomall", "sv_help", "sv_eject", "sv_tsay", "sv_psay", "sv_password",
        "sv_unban", "sv_slay", "sv_kick", "sv_status"
        }
      },
      "users": {
        "Mr. amckern": {
          "id": 96256,
          "groups": [ "admin_group" ]
        }
        "Admin 2": {
          "id": 97368842,
          "groups": [ "admin_group" ]
        }
        "Mod 1": {
          "id": 81646552,
          "groups": [ "admin_group" ]
        }
      }
    }
No Frils!

Comments

  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts Posts: 2,831 admin
    edited January 2014
    You have some syntax issues, next time use http://jsonlint.com/ to check you jsons.

    Your json would be correctly:
    {
        "groups": {
            "mod_group": {
                "commands": [
                    "sv_reset",
                    "sv_ban"
                ],
                "type": "allowed"
            },
            "admin_group": {
                "type": "allowed",
                "commands": [
                    "sv_listbans",
                    "sv_ban",
                    "sv_switchteam",
                    "sv_changemap",
                    "sv_reset",
                    "sv_say",
                    "sv_rrall",
                    "sv_randomall",
                    "sv_help",
                    "sv_eject",
                    "sv_tsay",
                    "sv_psay",
                    "sv_password",
                    "sv_unban",
                    "sv_slay",
                    "sv_kick",
                    "sv_status"
                ]
            }
        },
        "users": {
            "Mr. amckern": {
                "id": 96256,
                "groups": [
                    "admin_group"
                ]
            },
            "Admin 2": {
                "id": 97368842,
                "groups": [
                    "admin_group"
                ]
            },
            "Mod 1": {
                "id": 81646552,
                "groups": [
                    "admin_group"
                ]
            }
        }
    }
    
    Developer, Modder and Server Admin of Survival of the Fattest - Ingame Nick: Ghoul
Sign In or Register to comment.