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()?
|
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...)
|
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!
|
GetAddress() from INetChannelInfo (which you can get from IVEngineServer) will work I think
|
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.