Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.33 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.33 KB

Propagate KAG Bans

This program propagates bans to all connected servers, preventing banned players from switching servers to continue being a shithead. The plan for this is for it to eventually be used on all official KAG servers. However, feel free to use this on your own servers if you need to shit on the shitheads.

Prerequisites

Setup

  1. Add servers and adjust the reconnect interval in config.json

  2. Compile the program using npm run-script compile

  3. In a new mod, create an AngelScript file with the following code and add it to the gamemode.cfg of every gamemode your servers host (assuming the gamemode doesn't already have PropagateBans.as):

    #define SERVER_ONLY
    
    void onBan(const string username, const int minutes, const string reason)
    {
        tcpr("BAN " + username + " " + minutes + " " + reason);
    }
    
    void onUnban(const string username)
    {
        tcpr("UNBAN " + username);
    }
  4. Ensure the following settings are applied to autoconfig.cfg:

    • sv_tcpr = 1
    • sv_tcpr_timestamp = 0
  5. Run the program using npm run-script run

Docker

  1. Build: docker build . -tkag-propagate-bans
  2. Run: docker run -d --rm -v config.json:/kag-propagate-bans/config.json kag-propagate-bans