How to connect to a server using reserve slots
To use reserve slots when a server is full you and your users need to type into the console: connect <ip address>:<port> (port not needed if you're running on the default port for whatever server you run).
This plugin requires either cbaseserver tools or connect extensions, read their threads for more info on which one you want to pick (probably down to which games they support).
Optionally, you can use the donator plugin, too:
Immunity Reserve Slots is an extended version of *pRED's original plugin for CBaseServer. The best way to understand the plugin is to simply show you the cvar descriptions below.
The following cvar's are auto created on run in:
Who to kick when a valid player is found (0 - random, 1 - highest ping, 2 - highest time, 3 - lowest time).
Enable logging (0 - disable, 1 - enable highly verbose logs, 2 - only log the disconnected and connecting users).
Enable immunity check (0 - disable, 1 - immunity check if server is full of reserves, 2 - as with 1 but also allow players with high enough immunity and no reserve flag to stay connected).
Message to display when a client is kicked for a normal reserve slot ("default" - uses translation phrase, anything else uses what you enter).
Message to display when a client is kicked for a reserve slot based on immunity ("default" - uses translation phrase, anything else uses what you enter).
When enabled spectators are always kicked first before anyone else (0 - disable, all players are taken into account for kicking, 1 - enable).
The delay, in seconds, to kick spectators (0 - instant, any other value gives spectators a grace of xx seconds until they can be kicked).
The maximum amount of players that can connect to the server and kick a low immunity reserve slot player (0 - no limit, more than 0 to set the max limit).
This value and over are players who are considered to have high immunity (0 - disable, more than 0 to set the high immunity value).
This tries to kick people in such a way to prevent autobalance (0 - disable, 1 - enable).
Enable reject reason with the Connect extension (0 - disable, 1 - enable).
Message to display when a client gets rejected for a reserve slot when they have reserve rights with the Connect extension ("default" - uses translation phrase, anything else uses what you enter).
Allow direct connecting reserve slot users to connect without having to type in the password on a password protected server with the Connect extension (0 - disable, 1 - enable, 2 - as with 1 but allow all connecting clients to connect).
Enable kick list mode (0 - disable, normal reserve slot operation, 1 - only use a kick list to kick specific clients, 2 - as with 1 but allow any connecting client to kick people from the server).
Path to kick list file ("default" - uses a file in the sourcemod config folder called irs_kicklist.ini, anything else uses what you enter e.g. "cfg/kicklist.cfg").
When enabled along with the donators plugin, donaotrs will be allowed to connect (0 - disable, 1 - allow donators to connect).
The immunity value to give to donators, if required for immunity checks within IRS.
Reloads the kick list.
First you want to install the CBaseServer Tools extension or Connect extension, which are linked above. I highly recommend getting the latest snapshots of either extension.
To install my plugin simply place the file immunityreserveslots_<ext>
.smx into the sourcemod plugins folder and the phrases file into the translation folder on your server.
To add users to the system add them in your admin config (default: game
/addons/sourcemod/configs/admins.cfg) with the reserve flag. If you use the immunity feature of my plugin you'll also want to set their immunity to whichever levels you decide upon. Read the top of the admin config file for more info on immunity.
If you find any problems with the system you will need to provide the FULL logs the plugin creates if you enable logging. This is the only way I can figure out problems with the system. BUT it should be solid now.
Support is also only provided if you run SM 1.4+.
To compile the plugin yourself you will need to install the include files for the required extensions which can be found in their threads.
I really have to thank *pRED for his excellent CBaseServer tools extension as it spurred me into coding action for SourceMod!
Thanks goes to all the people who've helped me test the plugin.
- Added cvar to control when to kick spectators (sm_irs_kickspecdelay, set to 0 instantly kicks spectators, anything else gives them a grace of x secs before being kicked).
- Added donator plugin support (see: http://forums.alliedmods.net/showthread.php?t=145542
- Code cleanup.
- Added support for Connect 1.2.0+.
- Fix for non-TF2 games throwing errors on map start. Connect only.
- Fix for too many clients connecting in MVM games. Connect only.
- Fixed CloseHandle() bug.
- Recoded kick list mode for less disk I/O.
- Fixed a bug if kick list mode was set to 2 which could create a possible rare looping slot scenario.
- Added command to reload the kick list if users want to update the list as soon as possible (sm_irs_kicklist_reload), list now also updates automatically on map change properly.
- Cleaned up some code.
- Added auto password cvar so reserve clients can automatically connect to password protected servers, can also be set so any connecting client can connect e.g. for temporary purposes (sm_irs_autopassword).
- Fixed bug in keep balance code where it wouldn't kick spectators if there were any when the cvar for kick spectators first was disabled.
- Added kick list mode, this allows anyone to connect to the server (configurable) but goes through a list of steam id's for who should get kicked vs who can connect (sm_irs_kicklist_mode and sm_irs_kicklist_file).
- Removed sm_rescheck_mmunity command check thing I still had in there where it wouldn't have mattered anyway (i.e. I missed it).
- Added Connect extension support.
- Added cvars to configure the reject message on a full server (sm_irs_rejectreason_enable and sm_irs_rejectreason).
- Made use of GetURandomFloat for random mode.
- Improved logging code.
- Made the default action for detected reserve plugins to move to the disabled folder after unload rather than stopping the plugin.
- Changed translation phrase on plugin error to make more sense.
- Fixed incorrect statement in balance check code.
- Small optimisations.
- Added command check back in for "sm_reskick_immunity" as some servers might expect this as a valid way to grant default immunity if reading the official SM wiki.
- Added the regular SM reserve slot plugin to the plugin checks on startup.
- Added cvar "sm_irs_keepbalance", this will try and keep team balance best as possible when kicking players as not to trigger an autobalance.
- Drastic recoding for better performance.
- Added use of AskPluginLoad2() for improved late load detection (this makes the plugin require SM 1.3 now).
- Added detection of accidental installation of the default test plugin for CBaseServer tools to avoid any possible problems.
- New verbose logs, now create their own log files instead of spamming regular logs. Also improved verbosity.
- Fixed a small leak which happened if any logging was disabled.
- Spec check now uses a team check instead as in some games it could "incorrectly" flag users as spectating when they were dead. Also flags unassigned players now.
- Made final.
- Added full translation support.
- Changed the way the reason cvars work, no config changes needed for old users.
- Added a cvar option to limit the maximum amount of players with high immunity to kick low immunity players when the server is full (if more than the value are connected at the time no further connections will be allowed).
- A bit of code clean up.
- Added cvar to control whether or not spectators get kicked first before other players or not (defaults to enabled).
- Added option to only log who gets kicked.
- Fixed a very small bug in the logging code to do with detecting spectators.
- Fixed some logging bugs.
- Fixed a major bug in the immunity check and optimised regular check.
- Added lowest time option to kick types.
- Added cvars to control kick message for normal kick and immunity kick.
- Small optimizations.
- Initial release