Manual

Table of Content

Prerequisites

  • Webserver
    • PHP 5.2
    • MySQL 5.0
  • Source Dedicated Server

The Basic Admin Tool also supports SourceBans.

#top

Setting up Sourcebans

Webpanel

Note: You will need a database already setup before you start the installation.

  • Upload all the contents of /web_upload from the zip file to your webserver where you want SourceBans to be installed to.
  • CHMOD the following files/folders to 777:
  • /config.php
  • /demos
  • /images/games
  • /images/maps
  • /themes_c
  • Navigate your browser to http://yourdomain.com/your_sourcebans/install and follow the instructions on the screen.
  • Depending on the status of your file permissions, you may come to a screen telling you copy some text into your config.php file. You must do this when it tells you, or any AMX imports you need to do, will fail.
  • You will always get some code to add to /addons/sourcemod/configs/databases.cfg (on your gameserver), it is important to add this before you install the SourceBans plugin, or the plugin will not be able to contact the database.
  • Once you come to the end of the installation, you need to delete the /install folder from your server. Once you have done this, your SourceBans install will be done.

#top

Game Plugin

This part 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:

  • / – 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.

#top

Installation

Extract the contents of the plugin package to your / directory.

For your convenience this is a list of the files and their necessary locations, all of these are rooted in the /game_upload directory.

 

addons/sourcemod/configs/sourcebans/sourcebans.cfg

addons/sourcemod/plugins/sourcebans.smx

addons/sourcemod/scripting/sourcebans.sp

addons/sourcemod/translations/sourcebans.phrases.txt

#top

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
	}
}

#top

Configuration

After extracting these to your / 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 – 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.
  • AutoAddServer – Automatically add the server to the webpanel if it’s not added yet.
  • ServerIP – The server’s IP address. Needed when AutoAddServer is enabled.
  • ServerPort – The server’s port number. Needed when AutoAddServer is enabled.
  • BackupConfigs – Store the admins and groups on the gameserver for when the database is down. Will overwrite admins.cfg and admin_groups.cfg.
  • EnableAdmins – Enable the admins portion of SourceBans.
  • ServerID – Set the server ID assigned by SourceBans here. You can find this ID in the webpanel under Admin Panel > Servers.
  • 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.

#top

Updating

Updating is real easy. Just upload all the files to your FTP, and then navigate to http://yourdomain.com/your_sourcebans/updater. Now your database is updated to the latest version.

#top

Webpanel Usage

Quick setup guide for the Admin Panel

This is a quick guide on setting up your servers and admins so your downtime is to a minimum. Of course this depends on how many servers and admins you have. Expecting that you have 2 or more servers and more than 2 admins the following is suggested after you finished the SourceBans webpanel installation.

  • Adding GroupsFirst add your different groups for your admins for web and in-game (for example the groups: trial – junior – senior – root) and set the permissions for each individual group.

    If you want you can also create server group names here and assign servers (will be explained further down) to that name later. We suggest to only do this if you have many servers and want to easily assign admins to many servers with one click.

  • Adding ModsIf you run various HL2 mods it is suggested to first access the Mods page to see if your Mods are also listed. SourceBans installation comes standard with the most popular Source Games and Mods so there is a small chance you actually have to add another mod. None the less make sure of that.
  • Adding ServersWhen you have your Groups and Mods added accordingly you can now add your game servers on the Servers page. Simply click on “Add Server” and fill in the necessary data, select the correct mod and assign it to a server group (only applies if you created a server group).
  • Adding AdminsAfter you have added your Permissions Groups and added your servers you are ready to add the admins. Add an admin by going to the Admins page and click on “Add an admin”. Simply fill in the required data and as a password you can set a simple temporarily password for the admin in question. The admin will be able to change his / her password later under “Your account” which can be found at the right top.

    From the drop down boxes you should now be able to select a web admin group and server admin group which you created earlier or set individual permissions for the admin. When you created server groups you can assign the admin to a server group or you can set individual server(s) access to the admin.

You should now have a “working” copy of SourceBans. On the next map change or by typing sm_rehash in server console of the game server will make sure you or any other admins added get access as admin for the SourceMod and SourceBans functionality that have been assigned to the admin in question.

You can now easily go through the other options and possibilities SourceBans has to offer.

#top

Admin Panel (fully explained)

Admin Settings

This panel is actually called “Admin Management” in the bread crumbs. It allows you to manage your admins.

List Admins

When selected, this side tab lists all admins, server and web in the main panel. There are three columns, Name, Server Admin Group and Web Admin Group. If you need to view more info about an admin, click their row and it will expand. Once expanded, you can view their Server Admin Permissions (sometimes called access flags) and their Web Admin Permissions. Under Action there are links to Edit Details, Edit Premissions, Edit Server Access, Edit Groups and Delete Admin. Finally, there is an Immunity Level.

Add Admin

When selected, this side tab allows you to add an admin to the SourceBan system.

  • Admin Details Admin Login – The admin’s login ID.
  • Admin Steam ID – The admin’s Steam ID.
  • Admin Email – The admin’s email address. Be sure to set a valid email because password reminders will be send here if your admin forgets their password.
  • Use as admin password (checkbox) – If checked will require your admin to enter a password BEFORE using any server commands.
  • In order to use passwords, you need to change your PassInfoVar to something
    besides its default value in your MOD/addons/sourcemod/configs/core.cfg
    and inform your admins of its new value. They will then authenticate / enter
    their password by running:

    setinfo "YourPassInfoVar" "TheirPassword"

    in their client console.

  • Admin AccessUnder Server Access, check the servers or server groups you want the admin to have access to.
  • Admin PermissionsUnder Server Admin Group, you can select the group that you want the admin to be a member of, you can select Custom Premissions or you can click new group, both of which will expand and give you a list of permissions to assign.
  • Custom / New Group – Admin Server PremissionsUnder Standard Admin Server Permissions, you can check the permissions that you want this admin / group to have. These permissions are also called flags. Under Immunity you can choose the immunity level for this admin / group. Under Custom Admin Server Permissions, you can check

    the custom permissions that you want this admin / group to have. These permissions are also called flags.

  • Custom / New Group – Web Admin PremissionsUnder Web Admin Group, you can select the group that you want the admin to be a member of, you can select Custom Premissions or you can click new group, both of which will expand and give you a list of permissions to assign.If checked, Root Admin will give this admin FULL access to the site. Under Manage Admins, Server Management and Ban Management, Groups Management you can check the permissions that you want this admin / group to have. If checked, SourceBans Web Panel Settings will give this admin / groupaccess to the SourceBans Web Panel Settings page in the admin panel. Under Manage Mods, you can check the permissions that you want this admin / group to have.

#top

Server Settings

This panel is actually called Server management in the bread crumbs. It allows you to manage all of the servers attached to this SourceBans installation.

List servers

This side tab lists all of the servers attached to this SourceBans installation.

The top row says Servers and in parentheses, the total number of servers.

There are three column headings below the top row.

        • Hostname – The server name for the server in that row or if the server is offline or can’t be reached, its ip address.
        • Players – Shows the number of players currently connected and the total number the server can hold.
        • Mod – Has an icon that indicates which mod the server is running.
        • ActionBecause this column has so much stuff to items to talk about,

          it get’s its own section. This column has five links related to the server.

          • RCON – Opens a rcon console in the web browser to the server.
          • Admins – Lists all admins that have access to that server.
          • Config – Shows you options that should be set for that server in its /cfg/sourcemod.cfg file.
          • Edit – Allows you to edit the server information.
          • Delete – Deletes the server from this SourceBans installation.

Add new server

This side tab allows you to add a new server to this SourceBans installation.

Server Details

        • Server IP / Domain – Enter the server’s ip address or a DNS name that points to its ip address.
        • Server Port – Enter the server’s port (useually 27015).
        • RCON Password – Enter the server’s RCON password.
        • RCON Password (Confirm) – Enter the server’s RCON password again to confirm.
        • Server MOD – Select the server’s mod from the drop down menu.
        • Server Groups Check any server groups that you want this server to be a member of.

#top

Bans

This panel is actually called Ban management in the bread crumbs. It allows you to manage all the bans in this SourceBans installation.

Add a ban

In this side tab, you can add a ban.

        • Nickname – The nickname of the person you are banning.
        • SteamID – The SteamID of the person you are banning.
        • IP Address – The IP address of the person you are banning.
        • Ban Reason – Enter a reason here of why you are banning this person.
        • Ban Length – Select the ban length from the drop down menu.
        • Upload Demo – Click on the Upload Demo button to upload a demo.

Ban protests

When selected, this side tab allows you to view “Ban Protests” that were submitted by the public through the Protest a ban page.

There are three columns.

        • Nickname – The nickname of the person protesting the ban.
        • SteamID – The Steam ID of the person protesting the ban.
        • ActionSince this column has so much stuff to talk about, it gets its own section.
          • Contact – Write an E-mail to the protesting player. The email goes from noreply@yoursourcebans.com.

Ban submissions

Ban list

Just a link back to your banlist.

#top

Group Settings

This panel is actually called Group Management in the bread crumbs. It allows you to manage all groups (server, server admin, and web admin) on this SourceBans installation.

List groups

When selected, this side tab allows you to view all groups on this SourceBans installation.

It has three main sections which we will go over.

Web Admin Groups

In this section, you can view all Web Admin Groups in this SourceBans installation.

There are three columns of information in this section.

        • Group Name – The name of the group.
        • Admins in group – The total number of admins in the group.
        • Action – Has two links that allow you to manage the group. Edit allows you to edit the group and Delete allows you to delete the group.

If you click on a web admin group, it will expand and show you a group details section which will show all

of the web premissions assigned to the group.

Server Admin Groups

In this section, you can view all Server Admin Groups in this SourceBans installation.

There are three columns of information in this section.

        • Group Name – The name of the group.
        • Admins in group – The total number of admins in the group.
        • Action – Has two links that allow you to manage the group. Edit allows you to edit the group and Delete allows you to delete the group.

If you click on a server admin group, it will expand and show you a group details section which will show all of the server permissions assigned to the group.

Server Groups

In this section, you can view all Server Groups in this SourceBans installation.

There are three columns of information in this section.

        • Group Name – The name of the group.
        • Servers in group – The total number of servers in the group.
        • Action – Has two links that allow you to manage the group. Edit allows you to edit the group and Delete allows you to delete the group.

If you click on a server group, it will expand and show you a group details section which will show all of the servers assigned to the group.

Add a group

#top

SourceBans Settings

This panel allows you to edit application settings such as your logo and front page text for this installation of SourceBans.

#top

Manage Mods

This panel is actually called Mod management in the bread crumbs. It allows you to manage all “Server Mods” on this SourceBans installation.

List Mods

When selected, this side tab allows you to view all MODs on this SourceBans installation.

The top section says Server Mods and in parentheses, the total number of server mods.

There are three columns of information.

        • Name – The name of the mod.
        • Mod Folder – The root folder of the mod.
        • Mod icon – The icon of the mod.
        • Action – Has two links that allow you to manage the mod. Edit allows you to edit the mod, and Delete allows you to delete the mod.

Add new MOD

When selected, this side tab allows you to add a new mod to this SourceBans installation.

        • Mod Name – The name of the mod.
        • Mod Folder- The root folder of the mod.
        • Upload Icon – Click the Upload Mod Icon to upload a mod icon for this mod.

#top

Ingame usage

The SourceBans plugin allows for administrators to ban directly to the database from in game using very basic commands to do so.

You ban a player by running the following:

sm_ban <#userid|name> <minutes|0> [reason]

1 hour = 60 minutes

1 day = 1440 minutes

1 week = 10080 minutes

This will automatically result in the ban being submitted to the database.

Often times the connection to the MySQL server may get lost, or settings may be changed during the server running. In this case you can run the following if you have RCON access via SourceMod: sb_reload and sm_rehash

#top