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

Server Plugin and IP Addresses


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teknogrebo
Junior Member
Join Date: Jan 2005
Old 02-04-2005 , 10:17   Server Plugin and IP Addresses
Reply With Quote #1

I apologise if I'm being dense here, but is there any way of finding out a players IP address other than to record it from what is passed into ClientConnect()?
teknogrebo is offline
majin
New Member
Join Date: Dec 2004
Old 02-04-2005 , 10:32  
Reply With Quote #2

there might be something in the playerinfomanager (check the SDK) but it would probably be just as easy to add a string to your player class and set it when its passed through ClientConnect. (if you have a player class...)
majin is offline
teknogrebo
Junior Member
Join Date: Jan 2005
Old 02-04-2005 , 10:36  
Reply With Quote #3

There isn't anything in the playerinfo manager. You can just get a player info from the edict_t that is passed in at the same time. Unfortunately, there is no IP address info in the playerinfo class, and also if you try and retrieve a playerinfo from the edict at this point then you get back a null pointer. Therefore, the only thing to do really is keep a record of entity pointers and matching IP addresses yourself, then match up the entity and playerinfo later on, which is all a lot of unneccesary storage IMHO. I was hoping there was a nicer way of doing it than that!
teknogrebo is offline
BAILOPAN
Join Date: Jan 2004
Old 02-04-2005 , 10:47  
Reply With Quote #4

GetAddress() from INetChannelInfo (which you can get from IVEngineServer) will work I think
__________________
egg
BAILOPAN is offline
teknogrebo
Junior Member
Join Date: Jan 2005
Old 02-04-2005 , 11:00  
Reply With Quote #5

That worked a treat. Thanks for the info. They don't half make you jump through hoops for some information
teknogrebo 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 09:47.


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