View Single Post
Author Message
pRED*
Join Date: Dec 2006
Old 06-05-2008 , 03:52   [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #1

Update:
Quote:
Originally Posted by psychonic View Post
Updated gamedata for this is now here
http://hg.alliedmods.net/users/pred_...baseserver.txt


Without further ado (or any infact) I present CBaseServer tools.

Credit for the idea and research for this goes entirely to Nephyrin. I just stole it and made it usable for SourceMod.

Tools is probably a bit elaborate considering its a single hook.
Hooks the engine version of client connect and can provide the steamid of the connecting client.

I have no idea how secure this is (hasn't been auth'd) or how easy it is to spoof. I would not recommend using this to auth sourcemod admins.

The attached plugin will check if a client is admin and kick a client if they are (so works perfectly even if the server is entirely full - console connect only).
It works as a simple reserved slots plugin with no advanced features or comparing the confirmed steamid once the client has connected.
If I get permission to make this part of SourceMod core, i'll add this to the base reserved slots. Until then feel free to expand on my example to suit your needs.

Also in the code is my detour class that i've slowly been putting together, so if you want to try one, this should make it easier. (`k4rim and crimson - looking at you here)

Note: If you are using threaded sql admins this won't work because It cant instantly check if a steamid is an admin.

Source Code

Compatible with EP1 (Insurgency, etc.), Orangebox mods (AoC, PvKII, etc.), and Valve's new Orangebox (TF2, DODS, CSS OB). It is recommended to remove all previous dll/so, autoload, and gamedata files relating to the extension if upgrading.
Attached Files
File Type: zip cbaseserver-ext-2.0.1.zip (236.6 KB, 3335 views)

Last edited by psychonic; 04-18-2012 at 21:32. Reason: attached binary package to post
pRED* is offline