Skip to content

Commander Bans

Person8880 edited this page Apr 4, 2015 · 3 revisions

Overview

The commander bans plugin provides a way to ban players from becoming a team's commander.

Similar in function to the bans plugin, except for loading bans from the web. Use the web configs system for that.

This plugin only works in Natural Selection 2. It will not load in NS2: Combat.

Config

To add a ban for a player that's not in your server, you can either use the ingame command sh_commbanid, or add it to the file manually. A typical config file will look like this:

{
    "DefaultBanTime": 60,
    "BansSubmitURL": "",
    "BansSubmitArguments": {},
    "MaxSubmitRetries": 3,
    "SubmitTimeout": 5,
    "Banned": {
      "123456": {
        "UnbanTime": 1357055089,
        "Name": "Someone",
        "BannedBy": "Person8880",
        "Duration": 3600,
        "Reason": "Griefing."
      },
      "8765432": {
        "UnbanTime": 0,
        "Name": "Someone else",
        "BannedBy": "Person8880",
        "Duration": 0,
        "Reason": "Trolling."
      },
    }
}

The file should be called "CommBans.json" and should be placed in the directory defined as your plugin config directory (default is config://shine/plugins).

Option Description
DefaultBanTime Time in minutes to ban by default if you do not give a time.
BansSubmitURL URL to submit bans and unbans to.
BansSubmitArguments Extra arguments to send in the POST request. For example, a private key to authenticate.
MaxSubmitRetries Sets how many times the plugin should retry sending a ban/unban request if it timed out.
SubmitTimeout How long, in seconds, with no response before we consider the ban/unban request to be timed out.

Commands

Command Chat Command Arguments Description
sh_commban !commban <player> <duration> <reason> Bans the given player from commanding for the given duration and reason. Both duration and reason are optional.
sh_uncommban !uncommban <steamid> Unbans the given Steam ID from commanding.
sh_commbanid !commbanid <steamid> <duration> <reason> Bans the given Steam ID from commanding for the given duration and reason. Player does not have to be in the server (though if they are they will be kicked out).