Reserved Slots (SourceMod)

From AlliedModders Wiki
Revision as of 21:41, 10 November 2007 by PRED* (talk | contribs) (New page: ==Introduction== ==Cvars== *sm_reserve_type <0|1> *sm_reserve_slots <#> *sm_hide_slots <0|1> ==Reserve Type== sm_reserve_type <...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Cvars

Reserve Type

sm_reserve_type <#>

This controls how reserve slots work on the server (the default is 0).

  • sm_reserve_type 0

Public slots are used in preference to reserved slots. Reserved slots are freed before public slots. No players are ever kicked and once reserved slots are filled by a reserve slot player (and the rest of the server is full) they will remain occupied until a player leaves. The use of this is that there can always be at least one admin (assuming you only give reserved slots to admins) on the server at any time. If players inform you that there is a hacker on the server, at least one admin should be able to get it and do something about it. If a player without reserve slot access joins when there are only reserved spaces remaining they will be kicked from the server.

  • sm_reserve_type 1

If someone with reserve access joins into a reserved slot, the player with the highest latency and without reserve access (spectator players are selected first) is kicked to make room. Thus, the reserved slots always remain free. The only situation where the reserved slot(s) can become properly occupied is if the server is full with reserve slot access clients. This is for servers that want some people to have playing preference over other. With this method admins could one by one join a full server until they all get in.

Reserve Slots

This controls how many slots get reserved by the plugin (the default is 0).

Using sm_reserve_type 0 this is how many admins can join the server after it appears full to the public. Using sm_reserve_type 1 this is how many slots are saved for swapping admins in (you shouldn't need more than one)

Hidden Slots

sm_hide_slots <0|1>

This controls the plugin hides the reserved slots (the default is 0).

If enabled (1) reserve slots are hidden in the server browser window when they are not in use. For example a 24 player server with 2 reserved slots will show as a 22 player server (until the reserved slots are occupied). To connect to the reserved slot of a server that shows as full you will need to use 'connect ip:port' in console. (e.g. 'connect 192.168.1.100:27015')

There is no possible way for the reserved slots to be visible to admins and hidden from normal users. Admin authentication can only happen after the user is fully connected to the server and their steam id is available to SourceMod. For this reason it is often better to hide the slots otherwise public users will attempt to join the server and will get kicked again (rendering the ‘autojoin’ feature useless)

Immunity

To make players immune from being kicked by the reserved slots plugin they need to have access to the override 'sm_reskick_immunity' (users with root or reserved slot access are already immune).

NB: This is only relevant when using sm_reserve_type 1.

You can either assign this override to a flag using admin_overrides.cfg (e.g. "sm_reskick_immunity" "o" - to give all users with flag 'o' (custom flag 1) immunity from being kicked)

Or

Give groups access to the overrides in admin_groups.cfg (e.g. "sm_reskick_immunity" "allow")

Then add your VIP members or other users you wish to be immune from being kicked as admins with either the flag you specified or as members of the group you gave access to. (You can create a group with 0 flags and ‘0’ normal immunity and only this override if you don't want them to have any other privileges)

Full details on overriding command access can be found at Overriding Command Access (SourceMod)

Possible Future Additions

  • More methods of selecting the player to be kicked - connection time, afk idle time etc
  • Choice to redirect players instead of kicking.
  • Extra reserve mode that works as per mode '1' but only lets a specified number of admins in.