AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   H-Reserved (Advanced Reserved Slots) (https://forums.alliedmods.net/showthread.php?t=61913)

red! 10-13-2007 20:09

H-Reserved (Advanced Reserved Slots)
 
24 Attachment(s)
This plugin provides reserved slots for admins (or better: reserved connection slots) like in mani plugin.

The number of reserved slots is given by sm_hreserved_slots_amount. If sm_hreserved_slots_amount is undefined or set to -1, the number of hidden slots given by the number of total slots minus content of variable sv_visiblemaxplayer will be treated as reserved slots then.
New for Version 2.0: If no reserved slots are defined explicitely neither there are any hidden slots, the connect extension is used, if available.

If the public slots are full, normal players will be rejected from connecting on the reserved slot(s). When an admin with reserved slot access joins and sm_hreserved_drop_method is set to "1", a public slot is freed by kicking a non-admin. Afterwards the reserved slot is free again for the next admin to join.

If sm_hreserved_use_immunity is set to 1, the plugin uses the sourcemod-immunity level assigned to the players/admins to select the player to be kicked. If players have different immunity-levels one of them with the lowest immunity-level goes first. If sm_hreserved_immunity_decrement is set to a value above 0 the immunity-level of spectators is decreased by the value of sm_hreserved_immunity_decrement to make him beeing kicked before the other members of their immunity level. Admins with reserved slot access flag may be protected from beeing kicked by the setting of sm_hreserved_admin_protection.


dependencies:

sourcemod version 1.4.x
connect extension (optional)


commands:
hrs_status: print a status screen with informations about the current players and their probability of beeing dropped accourding the plugins config. needs generic admin flag.
config:
the configuration file hreserved_slots.cfg is located at <moddir>cfg/sourcemod/hreserved_slots.cfg. It will automatically be generated if missing. (So you do not really need to download and install this from the attachement). Additionally the plugin may use the externel cvar sv_visiblemaxplayers if you do not configure the amount of reserved slots explicitely.
cvars:
  • sm_hreserved_slots_enable: (def. "1") 0/1, disable/enable reserved slots
  • sm_hreserved_slots_amount: <int>, (def. "-1") number of reserved slots. Do not specify or set to -1 to automatically use hidden slots as reserved. New for version 2.0: set to 0 to enforce the use of the connect extension.
  • sv_visiblemaxplayers: <int>, set to the amount of public slots you wish to keep usable and visible to players. Set below the maximum number of slots your server provides. The difference between maximum slots and visible slots will become your reserved slots. May also be used in conjunction with sm_hreserved_slots_amount.
  • sm_hreserved_admin_protection: (def. "1")
  • 0 - admins are not protected from beeing dropped from server apart of their immunity level
  • 1 - admins are protected from beeing kicked except they are in spectator mode
  • 2 - admins will never be dropped from server to free reserved slots
  • sm_hreserved_immunity_decrement: <int> (def. "1"), value to be subtracted from the immunity level of spectators. The value 0 will make spectators to be treated like players in the game.
  • sm_hreserved_use_immunity: (def. "1")
  • 0 - the player immunity level will not be used to find a player to be dropped (is assumed to be 0 for all players). However, admin protection as specified by sm_hreserved_admin_protection still keeps valid.
  • 1 - use sourcemod immunity level to group players to priorities for beeing dropped from server
  • sm_hreserved_drop_method: (def. "1")
  • 0 - no players are dropped from server, reserved slot is blocked until a player leaves on his own,
  • 1 - kick a player to free reserved slot. New for version 2.0: if the connect extension is used, this is the only available drop method
  • 2 - offer player to be redirected to the server specified in sm_hreserved_redirect_target. If the player does not accept the redirection he will be kicked.
  • sm_hreserved_redirect_target: (def. ""), alternate server a client is offered to be redirected to if sm_hreserved_drop_method is set to value 2.
  • sm_hreserved_redirect_timer: (def. "12"), time to show the redirection offer dialog.
  • sm_hreserved_drop_select: (def. "0"), select how players are chosen to be dropped from server when there are multiple targets with the same priority.
  • 0 - Drop player with highest ping
  • 1 - Drop player with shortest connection time
  • 2 - Drop random target
  • sm_hreserved_bot_protection: (def. "0")
    • 0 - bots/fake clients will be kicked to free slots
    • 1 - bots/fake clients (e.g. SourceTV) will not be kicked to free reserved slots
  • sm_hreserved_auth_by_tag: (def. "0"), use clan tag given by variable sm_hreserved_auth_tag for admin authentication (mostly not very reasonable until protecting clan tags by external plugin)
    • 0 - enable
    • 1 - disable
  • sm_hreserved_auth_tag: (def. ""), clan tag given used for admin authentication (needs sm_hreserved_auth_by_tag=1)
changelog:
2.0: integrated connect extension; handling teamless players like spectators (thx to Corvette911); cleaned up debug output

1.5: reservations based on name tags
1.4.1: added some logging
1.4: added random target (sm_hreserved_drop_select 2)

1.3.1-r3: bugfix to avoid redirects on fake clients

1.3.1-r1: adaption to changed sourcemod behavior (UPDATE STRONGLY RECOMMENDED IF USING SOURCEMOD RELEASE >= 1854)
1.3.1: added center message on redirection
1.3: added config file hreserved_slots.cfg
1.2.3: fixed bug on hooking on cvar sm_hreserved_slots_enable causing the same player to be selected for dropping multiple times
1.2.2: changed GetClientCount(false) to GetClientCount(true); ?maybe? this did lead to unspecified behaviour for some configs
1.2.1: minor change for estimation of curently connected players (just to make the code more clear; no functional change); extended hrs_status screen
1.2: removed redundant call on debug-output; added cvar sm_hreserved_bot_protection; made hrs_status an official command (cleaned up output & restricted access to admins with generic admin flag); hooking on cvar sm_hreserved_slots_enable to make slots to be freed if plugin is enabled at runtime
1.1: added client redirection option as an alternative for kicking; major code cleanups; removed depecated cvar sm_hidden_slots_reserved
1.0.8: added option sm_hreserved_drop_select
1.0.7: added custom options sm_hreserved_admin_protection, sm_hreserved_immunity_decrement, sm_hreserved_use_immunity, sm_hreserved_drop_method
1.0.6: added sm_hreserved_slots_amount, changed enable variable from sm_hidden_slots_reserved to sm_hreserved_slots_enable (old name was inappropriate for new function with visible reserved slots)
1.0.5 beta: first public release

imported_sparky 10-13-2007 20:54

Re: H-Reserved Slots
 
Thanks trying it now I see you have it as css any reason it should not work on dods ??

red! 10-13-2007 21:24

Re: H-Reserved Slots
 
Quote:

Originally Posted by imported_sparky (Post 541831)
Thanks trying it now I see you have it as css any reason it should not work on dods ??

nope.

but i have no dod-server, thus i can not test it with dod.

imported_sparky 10-13-2007 21:29

Re: H-Reserved Slots
 
well I have a 32 player dods server


sm_hidden_slots_reserved 1
sv_visiblemaxplayers 30

server shows max players as 30 in hlsw
server shows max players as 32 in status in console

try to join when server shows 30 active players

steam join returns cannnot connect server is full I have root acces when I do sm_who :(

PrefeX 10-14-2007 00:32

Re: H-Reserved Slots
 
connect using the console instead of server list/favorites
"connect <ip>:<port>"

red! 10-14-2007 08:12

Re: H-Reserved Slots
 
Quote:

Originally Posted by PrefeX (Post 541880)
connect using the console instead of server list/favorites
"connect <ip>:<port>"

yep, that's the intended use. so users without restricted slot access can join the normal way (even with the "connect when slot is free" method) without getting the anoying "This slot is reserved" message.

Alternatively i use the hlsw-tool to connect. HLSW also tell you that there are no free slots, but when you connect anyhow you will join as you wanted.

Extreme_One 10-14-2007 13:03

Re: H-Reserved Slots
 
Cool.

Putting this on now.

Thank you.

imported_sparky 10-14-2007 17:38

Re: H-Reserved Slots
 
Thanks works great on dods just what I have been waiting for

red! 10-14-2007 17:50

Re: H-Reserved Slots
 
Quote:

Originally Posted by imported_sparky (Post 542129)
Thanks works great on dods just what I have been waiting for

okay, thus i have found a beta-tester for dod i changed the plugin state from CS:S to any. :up:

DontWannaName 10-14-2007 18:52

Re: H-Reserved Slots
 
Will this let you connect to the server with your reserved slot without using the console command connect? Also, does it kick spectators first then players? Does it let people use the reserved slot if a reserved slot player is already ingame taking up the slot? If so if another person with a reserved slot wants to come in will it kick someone to let them in?


All times are GMT -4. The time now is 10:46.

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