SourceBans:Plugin installation – SteamFriends Wiki

Important note: Only edit this page if you have something useful to add. Changes to this page are allowed, but patrolled.

SourceBans Documentation

This page describes the installation of the SourceBans plugin. Throughout this document there may be abbreviations, words, or phrases representative of other objects or phrases. Here is a list of what certain things represent

  • <mod> – this represents the “mod” directory, for example, cstrike, dod, or hl2mp
  • When a file path is trailed with * this represents “every file” in this directory
  • root/rooted – this means that this is where a file path starts.



Extract the contents of the plugin package to your <mod>/ directory.

For your convenience this is a list of the files and their necessary locations,  all of these are rooted in the <mod>/ directory.addons/sourcemod/configs/sourcebans/sourcebans.cfgaddons/sourcemod/plugins/sourcebans.smxaddons/sourcemod/scripting/sourcebans.spaddons/sourcemod/translations/plugins.sourcebans.txt

Database setup:

Edit addons/sourcemod/configs/databases.cfg and add an entry for SourceBans.

It should have the following general format:

"Databases"{"driver_default"                "mysql"        "sourcebans"        {        "driver"                        "mysql"        "host"                          "localhost"             // The host where your mysql server is located        "database"                      "sourcebans_db"         // The name of the database        "user"                          "sb"                    // The name of the user that the plugin should use to connect        "pass"                          "sbpass"                // The password for this user        }}


After extracting these to your <mod>/ directory find your sourcebans.cfg directory and set up the necessary information.
The following is an explanation of each option.

  • website
    • When a player is banned it shows this website address to the banned player along with the message given to them on the banning.
  • Addban (not implemented)
    • Allows administrators to add a ban to the database without the player being in the current server, and without using the web interface.
  • Unban
    • Allows administrators to remove a ban from the database without having to use the web interface.
  • DatabasePrefix
    • This is the prefix given to your bans tables in your MySQL database (this should be set up during the web interface installation)
  • RetryTime
    • This is how long a after a ban check has failed (usually due to connection issues) for the plugin to check again.
  • ProcessQueueTime
    • How often should backup ban queue is processed in minutes. This queue is a local file that is used to store bans when you lose connectivity to the mysql server.
  • BanReasons
    • These are generic options that are displayed in a menu if no reason is given when the console command for ban.
  • HackingReasons
    • These are generic options that are displayed in a menu if hacking is selected from the ban menu.
Please wait...

Get our New Magazine!

Want to be notified when our article is published? Enter your email address and name below to be the first to know.