Skip to content

Config options

addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json. Keys, types and defaults are generated from CS2-SimpleAdmin/Config.cs, so they match the plugin this site was built from. For a walk-through of the file, see Configuration.

General

Top-level options.

ConfigVersionnumberdefault 25

Version of the config layout. Set by the plugin: when it is older than the plugin expects, the plugin writes the new number into the file. Do not change it by hand.

EnableUpdateChecktrue/falsedefault true

On load, compare the plugin version with CS2-SimpleAdmin/VERSION on the fork's main branch and log a warning when a newer release exists.

Timezonetextdefault "UTC"

Time zone for penalty times stored in a MySQL database (a .NET/IANA zone id such as Europe/Copenhagen). An unknown id logs a warning and falls back to UTC. SQLite always uses UTC.

WarnThresholdmap number to text

Commands run when a player reaches a number of active warnings. The key is the warning count, the value a server command; USERID and STEAMID64 are replaced with the player. At or above the highest key, that key's command runs. Remove all entries to disable.

Default value
{
  "998": "css_addban STEAMID64 60 \"3/4 Warn\"",
  "999": "css_ban #USERID 120 \"4/4 Warn\""
}
MultiServerModetrue/falsedefault true

Penalties (bans, mutes, warnings) apply on every server that shares the database. With false each server only sees penalties given on that server.

DefaultMapslist of textdefault []

Map names offered in the admin menu's map change list.

WorkshopMapsmap text to numberdefault {}

Workshop maps offered in the admin menu: display name to workshop id.

CustomServerCommandslist of objectsdefault []

Extra entries for the admin menu's custom commands list. Each entry has Flag (permission, default @css/generic), DisplayName, Command and ExecuteOnClient (run as the admin instead of on the server).

DatabaseConfig

Which database to use and how to reach it. See Database.

DatabaseTypetextdefault "SQLite"

SQLite or MySQL. Any value containing "mysql" (any case) selects MySQL, everything else SQLite.

SqliteFilePathtextdefault "cs2-simpleadmin.sqlite"

SQLite database file, relative to the plugin folder (plugins/CS2-SimpleAdmin/). Must not be empty when SQLite is used.

SqliteBackupRetainCountnumberdefault 14

How many backups css_sqlbackup keeps in plugins/CS2-SimpleAdmin/backups/; older ones are deleted after each backup.

DatabaseHosttextdefault ""

MySQL server address. Required for MySQL.

DatabasePortnumberdefault 3306

MySQL server port.

DatabaseUsertextdefault ""

MySQL user. Required for MySQL.

DatabasePasswordtextdefault ""

MySQL password.

DatabaseNametextdefault ""

MySQL database (schema) name. Required for MySQL; the tables are created by the plugin.

DatabaseSSlModetextdefault "preferred"

MySQL TLS mode (none, preferred, required, verifyca, verifyfull). An unknown value falls back to preferred.

OtherSettings

Behaviour of commands, bans and messages.

ShowActivityTypenumberdefault 2

Who sees admin action messages in chat. 0: nobody. 1: everyone, but only admins (@css/kick or @css/ban) see the admin's name, other players see "ADMIN". 2: everyone, with the admin's name. 3: only admins.

TeamSwitchTypenumberdefault 1

How css_team moves a living player. 1: switch team without killing the player. Any other value: change team the normal way (the player dies). -k on the command always kills.

KickTimenumberdefault 5

Seconds between a kick or ban message and the actual disconnect, so the player can read the reason.

BanTypenumberdefault 1

What a ban is checked against on connect. 0: SteamID only. 1: SteamID and IP address (see CheckMultiAccountsByIp).

TimeModenumberdefault 1

How penalty time runs. 1: real time, a 60 minute ban ends 60 minutes later. 0: play time, the time only counts down while the player is on the server.

DisableDangerousCommandstrue/falsedefault true

Refuse bans, warnings, kicks, gags, mutes and silences whose target matches more than one player (for example @all, or a partial name that matches several players).

MaxBanDurationnumberdefault 10080

Longest ban in minutes an admin without @css/permban may give (default 7 days).

MaxMuteDurationnumberdefault 10080

Longest gag, mute or silence in minutes an admin without @css/permmute may give (default 7 days).

ExpireOldIpBansnumberdefault 0

Days after which IP addresses are dropped: bans whose end time is that long ago lose their IP, and stored player IPs not used for that long are deleted. 0 keeps them.

ReloadAdminsEveryMapChangetrue/falsedefault false

Reload admins and groups from the database on every map start.

How many recently disconnected players css_disconnected remembers.

NotifyPenaltiesToAdminOnConnecttrue/falsedefault true

When a player joins, tell online admins how many bans, gags, mutes, silences and warnings the player has had.

ShowBanMenuIfNoTimetrue/falsedefault true

When css_ban, css_gag, css_mute or css_silence is used in game without a time, open the duration menu instead of applying a default.

UserMessageGagChatTypetrue/falsedefault false

Block chat of gagged players by hooking the chat user message instead of the say commands. Read at load: restart the plugin after changing it.

CheckMultiAccountsByIptrue/falsedefault true

With BanType 1, also refuse players whose account has used any IP address that is banned (catches alternate accounts).

AdditionalCommandsToLoglist of textdefault []

Extra commands (lower case, for example css_noclip) to log like admin commands when a player runs them.

IgnoredIpslist of textdefault []

IP addresses never used for IP bans or account matching, such as a LAN cafe or shared NAT address.

Discord

Discord webhooks. Every webhook is optional; an empty value turns that message off.

DiscordLogWebhooktextdefault ""

Discord webhook URL for the admin command log. Empty disables it.

Discord embed for bans: Webhook (empty disables it), Color (hex such as #FF0000, white when empty), ThumbnailUrl, ImageUrl, Footer, and Time: {relative} shows when the ban ends as Discord relative time, any other value shows the duration.

Default value
[
  {
    "name": "Color",
    "value": ""
  },
  {
    "name": "Webhook",
    "value": ""
  },
  {
    "name": "ThumbnailUrl",
    "value": ""
  },
  {
    "name": "ImageUrl",
    "value": ""
  },
  {
    "name": "Footer",
    "value": ""
  },
  {
    "name": "Time",
    "value": "{relative}"
  }
]

Discord message for mutes. Same fields as the ban settings.

Default value
[
  {
    "name": "Color",
    "value": ""
  },
  {
    "name": "Webhook",
    "value": ""
  },
  {
    "name": "ThumbnailUrl",
    "value": ""
  },
  {
    "name": "ImageUrl",
    "value": ""
  },
  {
    "name": "Footer",
    "value": ""
  },
  {
    "name": "Time",
    "value": "{relative}"
  }
]

Discord message for gags. Same fields as the ban settings.

Default value
[
  {
    "name": "Color",
    "value": ""
  },
  {
    "name": "Webhook",
    "value": ""
  },
  {
    "name": "ThumbnailUrl",
    "value": ""
  },
  {
    "name": "ImageUrl",
    "value": ""
  },
  {
    "name": "Footer",
    "value": ""
  },
  {
    "name": "Time",
    "value": "{relative}"
  }
]

Discord message for silences. Same fields as the ban settings.

Default value
[
  {
    "name": "Color",
    "value": ""
  },
  {
    "name": "Webhook",
    "value": ""
  },
  {
    "name": "ThumbnailUrl",
    "value": ""
  },
  {
    "name": "ImageUrl",
    "value": ""
  },
  {
    "name": "Footer",
    "value": ""
  },
  {
    "name": "Time",
    "value": "{relative}"
  }
]

Discord message for warnings. Same fields as the ban settings.

Default value
[
  {
    "name": "Color",
    "value": ""
  },
  {
    "name": "Webhook",
    "value": ""
  },
  {
    "name": "ThumbnailUrl",
    "value": ""
  },
  {
    "name": "ImageUrl",
    "value": ""
  },
  {
    "name": "Footer",
    "value": ""
  },
  {
    "name": "Time",
    "value": "{relative}"
  }
]

Default file

What the plugin writes on first start, built from the same source. Copy it as a starting point; you only need the keys you change.

configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json
{
"ConfigVersion": 25,
"DatabaseConfig": {
"DatabaseType": "SQLite",
"SqliteFilePath": "cs2-simpleadmin.sqlite",
"SqliteBackupRetainCount": 14,
"DatabaseHost": "",
"DatabasePort": 3306,
"DatabaseUser": "",
"DatabasePassword": "",
"DatabaseName": "",
"DatabaseSSlMode": "preferred"
},
"OtherSettings": {
"ShowActivityType": 2,
"TeamSwitchType": 1,
"KickTime": 5,
"BanType": 1,
"TimeMode": 1,
"DisableDangerousCommands": true,
"MaxBanDuration": 10080,
"MaxMuteDuration": 10080,
"ExpireOldIpBans": 0,
"ReloadAdminsEveryMapChange": false,
"DisconnectedPlayersHistoryCount": 10,
"NotifyPenaltiesToAdminOnConnect": true,
"ShowBanMenuIfNoTime": true,
"UserMessageGagChatType": false,
"CheckMultiAccountsByIp": true,
"AdditionalCommandsToLog": [],
"IgnoredIps": []
},
"EnableUpdateCheck": true,
"Timezone": "UTC",
"WarnThreshold": {
"998": "css_addban STEAMID64 60 \"3/4 Warn\"",
"999": "css_ban #USERID 120 \"4/4 Warn\""
},
"MultiServerMode": true,
"Discord": {
"DiscordLogWebhook": "",
"DiscordPenaltyBanSettings": [
{
"name": "Color",
"value": ""
},
{
"name": "Webhook",
"value": ""
},
{
"name": "ThumbnailUrl",
"value": ""
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": ""
},
{
"name": "Time",
"value": "{relative}"
}
],
"DiscordPenaltyMuteSettings": [
{
"name": "Color",
"value": ""
},
{
"name": "Webhook",
"value": ""
},
{
"name": "ThumbnailUrl",
"value": ""
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": ""
},
{
"name": "Time",
"value": "{relative}"
}
],
"DiscordPenaltyGagSettings": [
{
"name": "Color",
"value": ""
},
{
"name": "Webhook",
"value": ""
},
{
"name": "ThumbnailUrl",
"value": ""
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": ""
},
{
"name": "Time",
"value": "{relative}"
}
],
"DiscordPenaltySilenceSettings": [
{
"name": "Color",
"value": ""
},
{
"name": "Webhook",
"value": ""
},
{
"name": "ThumbnailUrl",
"value": ""
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": ""
},
{
"name": "Time",
"value": "{relative}"
}
],
"DiscordPenaltyWarnSettings": [
{
"name": "Color",
"value": ""
},
{
"name": "Webhook",
"value": ""
},
{
"name": "ThumbnailUrl",
"value": ""
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": ""
},
{
"name": "Time",
"value": "{relative}"
}
]
},
"DefaultMaps": [],
"WorkshopMaps": {},
"CustomServerCommands": [],
"MenuConfig": {
"MenuType": "selectable",
"Durations": [
{
"name": "1 minute",
"duration": 1
},
{
"name": "5 minutes",
"duration": 5
},
{
"name": "15 minutes",
"duration": 15
},
{
"name": "1 hour",
"duration": 60
},
{
"name": "1 day",
"duration": 1440
},
{
"name": "7 days",
"duration": 10080
},
{
"name": "14 days",
"duration": 20160
},
{
"name": "30 days",
"duration": 43200
},
{
"name": "Permanent",
"duration": 0
}
],
"BanReasons": [
"Hacking",
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"KickReasons": [
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"WarnReasons": [
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"MuteReasons": [
"Advertising",
"Spamming",
"Spectator camera abuse",
"Hate",
"Admin disrespect",
"Other"
],
"AdminFlags": [
{
"name": "Generic",
"flag": "@css/generic"
},
{
"name": "Chat",
"flag": "@css/chat"
},
{
"name": "Change Map",
"flag": "@css/changemap"
},
{
"name": "Slay",
"flag": "@css/slay"
},
{
"name": "Kick",
"flag": "@css/kick"
},
{
"name": "Ban",
"flag": "@css/ban"
},
{
"name": "Perm Ban",
"flag": "@css/permban"
},
{
"name": "Unban",
"flag": "@css/unban"
},
{
"name": "Show IP",
"flag": "@css/showip"
},
{
"name": "Cvar",
"flag": "@css/cvar"
},
{
"name": "Rcon",
"flag": "@css/rcon"
},
{
"name": "Root (all flags)",
"flag": "@css/root"
}
]
}
}