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?

red! 10-15-2007 12:21

Re: H-Reserved Slots
 
Quote:

Originally Posted by DontWannaName (Post 542143)
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?

No (not yet)
yes
yes
yes

DontWannaName 10-15-2007 17:26

Re: H-Reserved Slots
 
I hate how they make you use connect. Im using a ES reserved slot script but it also makes you use connect. But yours seems better and more up to date. How are noobs suppose to use their reserved slot if they dont even know what the console is? I sell reserved slots and thats my greatest concern :|

dr1ft3r 10-15-2007 17:26

Re: H-Reserved Slots
 
can we have a cvar to make admins totally immune, regardless if they in spec or not.

Would also be nice to have a file for reserved slot accesss thats seperate from admin. We give reserve slot access to some none admins, and I don't want to give them immunity or admin flags to give a reserve slot.

imported_sparky 10-15-2007 18:30

Re: H-Reserved Slots
 
tell them to download hlsw

red! 10-15-2007 18:32

Re: H-Reserved Slots
 
there will be some more configuration options soon. total immunity is one candidate, a separate reserved slot file is not. thats what the immunity flag is for. you do not need to give reserved slot users any rights other that reserved slots. thats what I do and how I understand the sourcemod-philosophy. visible connection slots without the need of using the connect-command is another topic of interest, disabling the immunity-system the next one. my first focus will be on more finegrained kick-selection (by ping, latest connect - like mani did).

but at the moment I work on a winning team-restriction tool for my server. I plan to complete it this week, then I will spend some more time on the reserved-slot-system.

red! 10-16-2007 19:00

Re: H-Reserved Slots
 
Quote:

Originally Posted by DontWannaName (Post 542143)
Will this let you connect to the server with your reserved slot without using the console command connect?

there we go

Extreme_One 10-16-2007 19:26

Re: H-Reserved Slots
 
Quote:

Originally Posted by red! (Post 542854)
there we go

:up:

Thank you :)

DontWannaName 10-17-2007 01:31

Re: H-Reserved Slots
 
The plugin just comes with the smx and text file but where do you add the settings and such.

red! 10-17-2007 03:21

Re: H-Reserved Slots
 
Settings and such?

Where do you place your other cvars? I put 'em in my server.cfg, or more precisely in a separate config file that is included by my server.cfg.

Lurks 10-18-2007 05:12

Re: H-Reserved Slots
 
The server pops up a fatal error regarding translation file, mentioning the one you've provided. I just copied yours directly, making sure there was no [1] in the filename of course.

Incidentally, do you need to rename/remove the sourcemod default reserved slots script?

Isias 10-18-2007 09:38

Re: H-Reserved Slots
 
1 Attachment(s)
Added german language support

red! 10-20-2007 14:43

Re: H-Reserved Slots
 
Update: added new customization options

Tramp 10-20-2007 15:35

Re: H-Reserved Slots
 
Why i cant set that 16 slots will be available for payers and 17th slot is only reserved for admin. (if players is connecting to 17th, he/she will be kicked, only admin can access to 17th)
I dont want to kick playing players !

red! 10-20-2007 17:35

Re: H-Reserved Slots
 
Quote:

Originally Posted by Tramp (Post 544413)
Why i cant set that 16 slots will be available for payers and 17th slot is only reserved for admin. (if players is connecting to 17th, he/she will be kicked, only admin can access to 17th)
I dont want to kick playing players !

be sure to update to the current version (1.0.7), set sm_hreserved_drop_method to 0 and you will get exactly what you wanted.

DontWannaName 10-20-2007 19:25

Re: H-Reserved Slots
 
So I have to give users sourcemod access. What if I want people to just have a reserved slot? Do I have to give them basic admin and reserved slot access? Can I make a custom flag? How so?

red! 10-20-2007 20:31

Re: H-Reserved Slots
 
You can not make a custom flag. Only the plugin-developer could do so. But why should I? There is a flag exacly for this purpose - and no, you don't need to given them basic admin rights, just reserved slot, that's enough.

DontWannaName 10-20-2007 20:43

Re: H-Reserved Slots
 
Well first I have to get sourcebans working, Olly doesnt check these forums as much :(

red! 10-23-2007 18:15

Re: H-Reserved Slots
 
okay, 1.0.8 works fine, most of the focussed addons are done.

compbry15 10-23-2007 23:37

Re: H-Reserved Slots
 
I'm not sure why, but this plugin is not working. I am pretty sure I have version 1.0.8...but it is choosing the wrong person for kicking.

I have someone who has immunity level 5, and he has gotten kicked for reserved slot twice now. Everyone else on the server had immunity 0. The first time I was running an older version or HReserved, but this time I was running 1.0.8 (I updated a couple days ago).

I am using sourcebans, and I just checked via sm_rehash and it is showing him as the correct immunity level.

I am running HReserved with the default settings of the cvars, and all other reserved slot plugins are disabled.

red! 10-24-2007 13:12

Re: H-Reserved Slots
 
1 Attachment(s)
uh, dont know about that.

please do me a favour and try the version attached to this post. it's exactly the 1.0.8, but with the debug-output enabled. please type "hrs_status" in the console when the related player is online and post its output (server or ingame console).

compbry15 10-26-2007 01:09

Re: H-Reserved Slots
 
Quote:

[hreserved_slots] id: 24, name: not connected, immunity: -100
[hreserved_slots] id: 24, name: not connected, immunity: -100
[hreserved_slots] id: 23, name: not connected, immunity: -100
[hreserved_slots] id: 23, name: not connected, immunity: -100
[hreserved_slots] id: 22, name: not connected, immunity: -100
[hreserved_slots] id: 22, name: not connected, immunity: -100
[hreserved_slots] id: 21, name: Razorwolf, immunity: 0
[hreserved_slots] id: 21, name: Razorwolf, immunity: 0
[hreserved_slots] id: 20, name: not connected, immunity: -100
[hreserved_slots] id: 20, name: not connected, immunity: -100
[hreserved_slots] id: 19, name: not connected, immunity: -100
[hreserved_slots] id: 19, name: not connected, immunity: -100
[hreserved_slots] id: 18, name: not connected, immunity: -100
[hreserved_slots] id: 18, name: not connected, immunity: -100
[hreserved_slots] id: 17, name: Biggs, immunity: 0
[hreserved_slots] id: 17, name: Biggs, immunity: 0
[hreserved_slots] id: 16, name: not connected, immunity: -100
[hreserved_slots] id: 16, name: not connected, immunity: -100
[hreserved_slots] id: 15, name: [L2p]*Kai, immunity: -100
[hreserved_slots] id: 15, name: [L2p]*Kai, immunity: -100
[hreserved_slots] id: 14, name: not connected, immunity: -100
[hreserved_slots] id: 14, name: not connected, immunity: -100
[hreserved_slots] id: 13, name: not connected, immunity: -100
[hreserved_slots] id: 13, name: not connected, immunity: -100
[hreserved_slots] id: 12, name: not connected, immunity: -100
[hreserved_slots] id: 12, name: not connected, immunity: -100
[hreserved_slots] id: 11, name: not connected, immunity: -100
[hreserved_slots] id: 11, name: not connected, immunity: -100
[hreserved_slots] id: 10, name: not connected, immunity: -100
[hreserved_slots] id: 10, name: not connected, immunity: -100
[hreserved_slots] id: 9, name: not connected, immunity: -100
[hreserved_slots] id: 9, name: not connected, immunity: -100
[hreserved_slots] id: 8, name: not connected, immunity: -100
[hreserved_slots] id: 8, name: not connected, immunity: -100
[hreserved_slots] id: 7, name: VeNoM[Ed], immunity: 0
[hreserved_slots] id: 7, name: VeNoM[Ed], immunity: 0
[hreserved_slots] id: 6, name: [L2p]*Leviathon, immunity: -100
[hreserved_slots] id: 6, name: [L2p]*Leviathon, immunity: -100
[hreserved_slots] id: 5, name: not connected, immunity: -100
[hreserved_slots] id: 5, name: not connected, immunity: -100
[hreserved_slots] id: 4, name: CyrisAeon, immunity: 0
[hreserved_slots] id: 4, name: CyrisAeon, immunity: 0
[hreserved_slots] id: 3, name: joechill, immunity: 0
[hreserved_slots] id: 3, name: joechill, immunity: 0
[hreserved_slots] id: 2, name: not connected, immunity: -100
[hreserved_slots] id: 2, name: not connected, immunity: -100
[hreserved_slots] id: 1, name: not connected, immunity: -100
[hreserved_slots] id: 1, name: not connected, immunity: -100
[hreserved_slots] minimum_immunity: 0
[hreserved_slots] minimum_immunity: 0
[hreserved_slots] highest ping target: 3
[hreserved_slots] highest ping target: 3
[hreserved_slots] shortest connect target: 7
[hreserved_slots] shortest connect target: 7
[hreserved_slots] pre 1.0.8 target: 21
[hreserved_slots] pre 1.0.8 target: 21
[hreserved_slots] selected target: 3
[hreserved_slots] selected target: 3
This doesn't seem right at all. [L2p]*Leviathon is supposed to have 500 immunity. [L2p]*Kai is supposed to have 10 immunity. Razorwolf is supposed to have an immunity of 5. Everyone else should be 0.

CrimsonGT 10-26-2007 03:31

Re: H-Reserved Slots
 
Before I install this, I want to make sure I understand how it works...

Right now I have a 20 slot TF2 Server. If I install this, basically I HAVE to set 1 slot minimum as a reserved slot. First question is, with this reserved spot set, and lets say no one is on that has a reserved spot. Can the server fill up to 20/20 or will it only fill to 19/20?

Second question is, say I join and it boots the person with the lowest connection time. If someone else with a reserved spot joined right before me, will it boot them, or will it boot the person with the lowest play time AND without a reserve spot (so I guess technically the person in 18th place out of 20) or will it boot the guy who just joined with his reserve spot.

Basically, I don't want to create a reserved slot if its going to be unplayable when none of my admins are online. So I want to make sure its possible for just a random person to play in the reserve spot until an admin connects.

red! 10-26-2007 08:10

Re: H-Reserved Slots
 
Quote:

Originally Posted by CrimsonGT (Post 546220)
Basically, I don't want to create a reserved slot if its going to be unplayable when none of my admins are online. So I want to make sure its possible for just a random person to play in the reserve spot until an admin connects.

the reserved slot(s) will never be filled with players except there is no one which can be kicked or you disabled kicking.
the reason for this is simple. generally it is no possible to join a server without a free slot - it does not matter if this is a reserved slot or not. when you configure your server with 20/20 slots usable for players, nobody will be able to connect even if he is admin. i need the free slot to let players connect first and decide if he can stay or not. i can not decide this before he is connected and authenticated by sourcemod.

red! 10-26-2007 08:16

Re: H-Reserved Slots
 
Quote:

Originally Posted by compbry15 (Post 546206)
This doesn't seem right at all. [L2p]*Leviathon is supposed to have 500 immunity. [L2p]*Kai is supposed to have 10 immunity. Razorwolf is supposed to have an immunity of 5. Everyone else should be 0.

no, you did not get things correctly. this debug-print does not give the real immunity but the calculated one as configured by your cvar-settings. "-100" is a constant that denotes a "free or unkickable" slot. when you set up the plugin not to kick admins with reserved slot access this tells me that all players with the [L2p]* tag are admins and will not be kicked. minimum immunity denotes the group a player is selected to be kicked. in this case it is 0. from all players with (computed) immunity of 0 it would select id 3 to be kicked due to his ping.

lijpe frits 10-26-2007 09:05

Re: H-Reserved Slots
 
Nice plug-in mate. I have it workin on my server and its doing its job great! Thanks dude :up:

compbry15 10-26-2007 09:57

Re: H-Reserved Slots
 
Quote:

Originally Posted by red! (Post 546283)
no, you did not get things correctly. this debug-print does not give the real immunity but the calculated one as configured by your cvar-settings. "-100" is a constant that denotes a "free or unkickable" slot. when you set up the plugin not to kick admins with reserved slot access this tells me that all players with the [L2p]* tag are admins and will not be kicked. minimum immunity denotes the group a player is selected to be kicked. in this case it is 0. from all players with (computed) immunity of 0 it would select id 3 to be kicked due to his ping.

So is there a way to make it respect the immunity levels I gave to Razorwolf in this example? I don't want him to have any admin abilities, or a reserved slot. I just want him to be unkickable.

red! 10-26-2007 12:32

Re: H-Reserved Slots
 
You can assign an immunity level to Razorwolf without any other admin rights. That's no problem. Thats what I do with players we like to have as guests on our server.

I created a player group like this in my admin_groups.cfg

"Guest"
{
Overrides
{
}
"flags" ""
"immunity" "2"
}

and thats what I get when there are guests and admin sonline:

[hreserved_slots] id: 4, name: VeNgA, immunity: 2
[hreserved_slots] id: 3, name: No-Aim, immunity: 0
[hreserved_slots] id: 2, name: >>>SNAKE<<<, immunity: 0
[hreserved_slots] id: 1, name: oBoschi, immunity: -100


venga has guest-immunity, oBoschi is an admin, the other two players have no special rights

compbry15 10-26-2007 12:59

Re: H-Reserved Slots
 
Hmm ok, I guess it is sourcebans that is the problem.

I have Razorwolf in a group on Sourcebans that basically is set up like this (if it were a flatfile config, not however sourcebans works)

"Guest"
{
Overrides
{
}
"flags" ""
"immunity" "5"
}

I guess it is some problem with sourcebans that is not loading group immunity correctly.

Thanks, i guess i will downgrade to a flatfile instead of database, since it is really important that this works on my server

Kramerika 10-29-2007 09:22

Re: H-Reserved Slots
 
Are these the proper settings to make admins immune to kicking except when in spectator and to make it kick spectators first then players in the game based on the time connected?

sm_hreserved_slots_enable 1
sm_hreserved_slots_amount -1
sv_visiblemaxplayers 25 (we have 24 maxplayers)
sm_hreserved_admin_protection 1
sm_hreserved_immunity_decrement 1
sm_hreserved_use_immunity 1
sm_hreserved_drop_method 1
sm_hreserved_drop_select 1

red! 10-29-2007 13:31

Re: H-Reserved Slots
 
Quote:

Originally Posted by Kramerika (Post 547364)
sm_hreserved_slots_enable 1
sm_hreserved_slots_amount -1
sv_visiblemaxplayers 25 (we have 24 maxplayers)
sm_hreserved_admin_protection 1
sm_hreserved_immunity_decrement 1
sm_hreserved_use_immunity 1
sm_hreserved_drop_method 1
sm_hreserved_drop_select 1

no, not exactly.

sv_visiblemaxplayers 23 or 22 (must be less than maxplayers)

probably you want so set this to 24 and increase maxplayers to 25


All times are GMT -4. The time now is 19:09.

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