How do I ban someone on my server both indefinitely and for a few days? What time scale does it go by, minutes?
What are the console commands for such?
Hello codemaster94.
To ban by Steam ID:1.) Create the configuration file:
Navigate to your
gesource/cfg folder, create a .cfg file called "
banned_users.cfg"
2.) Obtain their Steam ID:You'll need to know their Steam ID, you can obtain this by using the
status command in the server console while their online. If you want to obtain a Steam ID while their offline, search for them on:
http://steamidfinder.com/3.) Adding users to the list:Once you have their Steam ID, add this line to your
banned_users.cfg configuration file,
banid 0 STEAM_XX:X:XXXXXX --
Where the X's are put their ID4.) Add an automatic execute reference to your main server's cfg file:Anywhere in your server's configuration file, add a line with:
exec banned_users.cfgThis will be executed (activated) each time you start the server.
Notes:
- The number after banid determines time measured in minutes, 0 (as demonstrated) is a permanent ban.
- Add another by creating a new line on the configuration file.
To ban by IP Address (Process much like Steam ID)1.) Create the configuration file:
Navigate to your
gesource/cfg folder, create a .cfg file called "
banned_ips.cfg"
2.) Obtain their IP Address:You'll need to know their IP Address, you can obtain this by using the
status command in the server console while their online. If you want to obtain their IP Address while their offline, search through your log files.
3.) Adding users to the list:Once you have their IP Address, add this line to your
banned_ips.cfg configuration file,
addip 0 xxx.xxx.xxx.xxx4.) Add an automatic execute reference to your main server's cfg file:Anywhere in your server's configuration file, add a line with: exec
banned_ips.cfgThis will be executed (activated) each time you start the server.
Notes:
- You can use
banip but the console recommends using
addip instead.
- The number after
addip determines how long they will be banned for, 0 means permanent.
- It appears to append to the server's cache, for example, removing an ID or IP from the list won't take effect until the you either restart the server or manually from console/rcon exec the configuration file again.
Hope this helps,
Cheers,