AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Server Plugin and IP Addresses (https://forums.alliedmods.net/showthread.php?t=37264)

teknogrebo 02-04-2005 10:17

Server Plugin and IP Addresses
 
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()?

majin 02-04-2005 10:32

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...)

teknogrebo 02-04-2005 10:36

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!

BAILOPAN 02-04-2005 10:47

GetAddress() from INetChannelInfo (which you can get from IVEngineServer) will work I think

teknogrebo 02-04-2005 11:00

That worked a treat. Thanks for the info. They don't half make you jump through hoops for some information :)


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

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