Raised This Month: $77 Target: $400
 19% 

[EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots


Post New Thread Reply   
 
Thread Tools Display Modes
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, 2851 views)

Last edited by psychonic; 04-18-2012 at 21:32. Reason: attached binary package to post
pRED* is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 06-05-2008 , 10:35   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #2

just looked at it fast, this is sooooo nice!!!!! thx alot man.
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
1nsane
SourceMod Donor
Join Date: Sep 2005
Old 06-05-2008 , 13:58   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #3

Goodjob .
1nsane is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 06-05-2008 , 16:34   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #4

Master pRED at work. Good job!
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.
^BuGs^ is offline
blik
Senior Member
Join Date: May 2006
Old 06-05-2008 , 16:47   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #5

Awesome work! Think this has finally converted me to sourcemod...

Edit: Meant to say, tested this on a small TF2 server, windows 2003, latest sourcemod 1.0 snapshot, worked perfectly - Fantastic work!

Last edited by blik; 06-05-2008 at 16:50.
blik is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 06-05-2008 , 17:44   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #6

Good job!
+1 *pRED
+1 Nephyrin
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
FLOOR_MASTER
Senior Member
Join Date: Mar 2008
Old 06-05-2008 , 18:00   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #7

I love you.
FLOOR_MASTER is offline
pRED*
Join Date: Dec 2006
Old 06-05-2008 , 18:23   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #8

Mmm updates.
pRED* is offline
WoZeR
Donor
Join Date: Nov 2007
Old 06-06-2008 , 01:26   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #9

predcrab can you spoof the max player packet going to a client so a server with max players of 32 shows 32/33 to the client. This will fool their client to allow them to double click the server instead of typing connect from the console. Or just hack sv_visiblemaxplayers to allow a value higher than 32.

I'm not sure if this is the spot but IDA shows this in engine.dll.

Quote:
.rdata:102AD338 ; char aGametype[]
.rdata:102AD338 aGametype db 'gametype',0 ; DATA XREF: sub_1009B220+388o
.rdata:102AD341 align 4
.rdata:102AD344 ; char aRegion[]
.rdata:102AD344 aRegion db 'region',0 ; DATA XREF: sub_1009B220+342o
.rdata:102AD34B align 4
.rdata:102AD34C ; char aLan[]
.rdata:102AD34C aLan db 'lan',0 ; DATA XREF: sub_1009B220+305o
.rdata:102AD350 ; char aOs[]
.rdata:102AD350 aOs db 'os',0 ; DATA XREF: sub_1009B220+2D5o
.rdata:102AD350 ; sub_100B4C20+2D7o ...
.rdata:102AD353 align 4
.rdata:102AD354 ; char aPassword[]
.rdata:102AD354 aPassword db 'password',0 ; DATA XREF: sub_1009B220+2BCo
.rdata:102AD354 ; sub_100B4C20+2B0o ...
.rdata:102AD35D align 10h
.rdata:102AD360 ; char aGamedir[]
.rdata:102AD360 aGamedir db 'gamedir',0 ; DATA XREF: sub_1009B220+275o
.rdata:102AD368 ; char aBots[]
.rdata:102AD368 aBots db 'bots',0 ; DATA XREF: sub_1009B220+259o
.rdata:102AD36D align 10h
.rdata:102AD370 ; char aMax[]
.rdata:102AD370 aMax db 'max',0 ; DATA XREF: sub_1009B220+1E0o
.rdata:102AD370 ; sub_1009B220+229o
.rdata:102AD374 ; char aPlayers[]
.rdata:102AD374 aPlayers db 'players',0 ; DATA XREF: sub_1009B220+1B5o
.rdata:102AD374 ; sub_1009B220+201o
.rdata:102AD37C ; char aChallenge[]
.rdata:102AD37C aChallenge db 'challenge',0 ; DATA XREF: sub_1009B220+17Bo
.rdata:102AD386 align 4
.rdata:102AD388 ; char aProtocol[]
.rdata:102AD388 aProtocol db 'protocol',0 ; DATA XREF: sub_1009B220+15Bo

Last edited by WoZeR; 06-06-2008 at 01:29.
WoZeR is offline
pRED*
Join Date: Dec 2006
Old 06-06-2008 , 02:58   Re: [EXTENSION] CBaseServer (+ Detouring class) - Reserved Slots with 0 wasted slots
Reply With Quote #10

Updated plugin so it only kicks people if the server is full. Interesting concept.

Wozer: You sure you want this? Reasonably trivial to add but will stop the autojoin function from working. Most reserved slot users know to use console.
pRED* is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:26.


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