Raised This Month: $51 Target: $400
 12% 

ServerPlugin::ClientConnect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
imported_red
Junior Member
Join Date: Dec 2004
Old 01-16-2005 , 19:28   ServerPlugin::ClientConnect
Reply With Quote #1

Hi Everybody,

I am playing around with server plugings and tried to implement reserved slots for counterstrike source dedicated servers without kicking users that are already in the game.

When I had a look at ServerPlugin::ClientConnect( bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ),

I noticed that pEntity points to not finally initialized user-structure returning "null" on a playerinfomanager->GetPlayerInfo(pEntity)) call.

ClientConnect is the only position I can reject players without kicking 'em afterwards, but it's completely useless when I can access any information on the connecting player!!!

Are there any known workarounds?
imported_red is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 01-16-2005 , 20:51   Re: ServerPlugin::ClientConnect
Reply With Quote #2

Quote:
Originally Posted by red
I noticed that pEntity points to not finally initialized user-structure returning "null" on a playerinfomanager->GetPlayerInfo(pEntity)) call.
Why do you need playerinfomanager?? The only data you have at the moment is alredy in the ClientConnect arguments (f.ex you do not have SteamID yet, no stats...)

/X
XAD is offline
BAILOPAN
Join Date: Jan 2004
Old 01-16-2005 , 21:10  
Reply With Quote #3

The client callbacks are quiet useless, you have, in the order they're called:
ClientConnect :: almost no useful info
ClientChanged
ClientNetworkIdValidated :: no useful info or edict
ClientPutInServer :: IPlayerInfo will be a corrupt pointer
ClientActive :: IPlayerInfo is valid, but ::IsConnected() returns false!

As you can see, it's not pretty...
__________________
egg
BAILOPAN is offline
imported_red
Junior Member
Join Date: Dec 2004
Old 01-17-2005 , 05:29  
Reply With Quote #4

hmm, thats what I have expected - and never wanted to hear. shit.

... but thanks.
imported_red is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 01-17-2005 , 08:53  
Reply With Quote #5

Quote:
Originally Posted by red
hmm, thats what I have expected - and never wanted to hear. shit.

... but thanks.
Hmm, again... what info do you need in IPlayerInfo at that point?? Or at all for doing reserved slots???

ClientConnect : As the player is not yet authorized (as it must have a connection before doing it) you can only refuse connection based on name and IP...

ClientNetworkIdValidated : Have you checked that the edict doesn't have the SteamID set?? If you flag everyone that is connected but not yet authorized you can check the SteamID with the engine function...

ClientPutInServer : You now have the SteamID so now, at least you, can kick them if they have a bad authid (if it wasn't possible during ClientNetworkIdValidation)...

Whats wrong with kicking them at the two last steps above?? If the player is SteamID banned they will not be rejected at ClientConnect but later (as the server don't yet have the SteamID at that point). You kick with a reason so what so bad with kicking (reject looks similar anyway)??

/X
XAD is offline
Reply



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 12:45.


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