AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Immunity Reserve Slots (2.0.8) (https://forums.alliedmods.net/showthread.php?t=93053)

Jamster 05-23-2009 19:23

Immunity Reserve Slots (2.0.8)
 
61 Attachment(s)
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).


Extension requirements
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).

Connect: http://forums.alliedmods.net/showthread.php?t=162489
CBaseServer: http://forums.alliedmods.net/showthread.php?t=72322

Optionally, you can use the donator plugin, too:
http://forums.alliedmods.net/showthread.php?t=145542

About:

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:
cfg/sourcemod/plugin.immunityreserveslots.cfg

sm_irs_kicktype
Default: 0
Who to kick when a valid player is found (0 - random, 1 - highest ping, 2 - highest time, 3 - lowest time).

sm_irs_log
Default: 0
Enable logging (0 - disable, 1 - enable highly verbose logs, 2 - only log the disconnected and connecting users).

sm_irs_immunity
Default: 1
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).

sm_irs_kickreason
Message to display when a client is kicked for a normal reserve slot ("default" - uses translation phrase, anything else uses what you enter).

sm_irs_kickreason_immunity
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).

sm_irs_kickspecfirst
Default: "1"
When enabled spectators are always kicked first before anyone else (0 - disable, all players are taken into account for kicking, 1 - enable).

sm_irs_kickspecdelay
Default: "0"
The delay, in seconds, to kick spectators (0 - instant, any other value gives spectators a grace of xx seconds until they can be kicked).

sm_irs_highimmunitylimit
Default: "0"
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).

sm_irs_highimmunityvalue
Default: "0"
This value and over are players who are considered to have high immunity (0 - disable, more than 0 to set the high immunity value).

sm_irs_keepbalance
Default: "0"
This tries to kick people in such a way to prevent autobalance (0 - disable, 1 - enable).

sm_irs_rejectreason_enable
Default: "0"
Enable reject reason with the Connect extension (0 - disable, 1 - enable).

sm_irs_rejectreason
Default: "default"
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).

sm_irs_autopassword
Default: "0"
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).

sm_irs_kicklist_mode
Default: "0"
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).

sm_irs_kicklist_file
Default: "default"
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").

sm_irs_donator_support
Default: "0"
When enabled along with the donators plugin, donaotrs will be allowed to connect (0 - disable, 1 - allow donators to connect).

sm_irs_donator_immunity
Default: "0"
The immunity value to give to donators, if required for immunity checks within IRS.

Server Commands:

sm_irs_kicklist_reload
Reloads the kick list.

Installing:

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.

Support:

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.

Special Thanks:

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.

Changelog

2.0.8
- 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).

2.0.7
- Added donator plugin support (see: http://forums.alliedmods.net/showthread.php?t=145542).

2.0.6
- Code cleanup.
- Added support for Connect 1.2.0+.

2.0.5
- Fix for non-TF2 games throwing errors on map start. Connect only.

2.0.4
- Fix for too many clients connecting in MVM games. Connect only.

2.0.3
- Fixed CloseHandle() bug.

2.0.2
- 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.

2.0.1
- 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).

2.0
- Added Connect extension support.
- Added cvars to configure the reject message on a full server (sm_irs_rejectreason_enable and sm_irs_rejectreason).

1.0.4
- Made use of GetURandomFloat for random mode.
- Improved logging code.

1.0.3
- 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.

1.0.2
- 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.

1.0.1
- 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.

1.0
- Made final.
- Added full translation support.
- Changed the way the reason cvars work, no config changes needed for old users.

0.3.4
- 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.

0.3.3
- Added cvar to control whether or not spectators get kicked first before other players or not (defaults to enabled).

0.3.2
- Added option to only log who gets kicked.

0.3.1
- Fixed a very small bug in the logging code to do with detecting spectators.

0.3
- Fixed some logging bugs.
- Fixed a major bug in the immunity check and optimised regular check.

0.2
- Added lowest time option to kick types.
- Added cvars to control kick message for normal kick and immunity kick.
- Small optimizations.

0.1
- Initial release

12345 05-23-2009 19:29

Re: Immunity Reserve Slots
 
This plugin support l4d?

DontWannaName 05-23-2009 19:38

Re: Immunity Reserve Slots
 
cbase doesnt work with L4D so no. Missing the header?

Jamster 05-23-2009 20:00

Re: Immunity Reserve Slots
 
For supported games read pRED's thread linked above, but I don't think it does, no.

Also, where is my plugin info, submit system still bugged? ;__;

flubber 05-24-2009 15:19

Re: Immunity Reserve Slots
 
Thanks Jamster for the immunity version, i've just installed it and activate the log, i'll give you feedback asap.

Jamster 05-24-2009 15:36

Re: Immunity Reserve Slots
 
Thanks. Yeah, as long as you set the immunity cvar to 2 it'll do what you want for your server!

flubber 05-24-2009 15:54

Re: Immunity Reserve Slots
 
By the way i was thinking of something : A cvar to set the texte message explaining the kick reason.

Jamster 05-24-2009 16:30

Re: Immunity Reserve Slots
 
It's something I'll note down for a future version.

HanoverFist 05-24-2009 23:00

Re: Immunity Reserve Slots
 
do I disable the sourcemod reserve slots?

msleeper 05-25-2009 06:27

Re: Immunity Reserve Slots
 
Yeah disable the built-in reserved slots.

I can't wait to use this update when you add in a kick message. Also, can you add "lowest time" to your kick method? I'd rather kick people who just joined recently, than someone who has been on the server for a long time.


All times are GMT -4. The time now is 15:36.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.