Banlists in version 15.9 and other changes - callofduty4x/CoD4x_Server GitHub Wiki

CoD4X v15.9+ and v16.1+ comes without an internal banlist. We have moved it out into plugins. The following official plugins are available for banlists, but you can write your own if you like:

legacybanlist

-> This plugin has the purpose to read the old banlist.dat -> This plugin is only needed if you had CoD4X18 server with bans before version 15.9. CoD4X17a banlists have to be discarded. -> The banlist is in read only mode and not used to add new bans. Just to enforce the old bans.

How to use? Make sure banlist.dat is in cod4 root directory. Put into your server.cfg file the line: loadplugin legacybanlist

simplebanlist

-> Works like the old banlist but stores playerids which is the new format and replaces GUIDs -> Can be used with legacybanlist together -> Each server needs its own banlist. Symlinking can broke it sooner or later.

How to use? Make sure banlist.dat is in cod4 root directory. Put into your server.cfg file the line: loadplugin simplebanlist -> It will create a file called banlist_v2.dat

sourcebansplugin

-> Using a modified version of the SourceBans webinterface you can find for now here: https://github.com/IceNinjaman/SourceBans-Fork/archive/v1.x.zip -> Requires a webserver with PHP 5.6 and a MYSQL database -> Allows easy managing of bans across multiple servers -> Is recommended when you have more than 1 Cod4 server

How to use? This is a more complicated setup. A detailed setup guide will maybe follow later. Put into your server.cfg file the lines in following order:

set sourcebans_url "http://yourdomain/sourcebans/serverexec.php" set sourcebans_identkey "YourSecretKey" loadplugin sourcebansplugin

Install the webinterface you can find in directory "web" by uploading its content to https://yoursite.com/sourcebans

Ignore all content located in "game/addons/sourcemod". This is not part of the setup here. (Only needed for sourceengine servers)

Make sure all uploaded files are owned by the webserver/PHP-Engine user. Create a new MySQL database. Something like this usually does it:

mysql -u root -p

CREATE DATABASE sourcebans CHARACTER SET utf8; GRANT ALL ON sourcebans.* TO 'sourcebabs'@'localhost' IDENTIFIED BY 'randompasswordyouwritedown'; EXIT;

Then open in your browser https://yoursite.com/sourcebans/install Finish the installation. Everything related to sourcemod can you ignore.

The modified SourceBans webinterface contains the file "serverexec_conf.php" In this file you have to change the identkey to yoursecretkey.

Installation should be done. Starting the cod4 server with plugin should add it automatically to sourcebans database. Servers should not be added manually. It happens full automatically.

Sourcebans plugin will add the following server commands: "dumpbanlist" - just prints the Sourcebans URL "dumpbanlistcache" - Just a debugging command we going to remove soon. It prints the bans cached on server. "sm_psay" - needed to message from the webinterface "sm_chat" - the admin chat command. Everyone who has sm_say available can see the admin chat.

Adminchat can be used by typing @my message Everyone can type into the adminchat but only admins can read it.

Private chat can be used by typing @@username my message

It is recommended to clear nvconfig_v3.dat and manage admins only by using the plugins webinterface. Some commands like tempban and permban need to be added from the webinterface or the ban gets not added. Steam_31:x:y is a playerid and not a steam id. Bans have only an effect when used on playerIDs.

About PlayerIDs and SteamIDs:

Every player on server has a so called player ID. It usually looks like this [U:32:xxxxxxxxxx] Some players have also a Steam ID which looks like this: [U:1:xxxxxxxxxx] Rarely the PlayerID can be equal to the SteamID.

The output of the status console command has been changed to the following example output:

hostname: CoD4Host version : CoD4 X 1.8 linux-i386 build 1363 Jun 26 2016 udp/ip : w.x.y.z:28960 os : linux type : dedicated server map : mp_backlot

num score ping playerid steamid name lastmsg address qport rate


Be aware address can be of format w.x.y.z:p or also [a:b:c:d:e:f:g:h]:p