AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get Server's IP (https://forums.alliedmods.net/showthread.php?t=156013)

ProIcons 04-29-2011 16:59

Get Server's IP
 
Well i wanted to get somehow the Server's ip. I noticed
on the cvar "ip" on my Server is returning "localhost" and in the cvar
"net_address" the local ip of this server. So i had a conclusion that if you don't specify a bind ip address, and the server is not connecting directly to a gateway but instead to a router, you will get server's Local IP with "net_address" although in my Public Servers, that they are connecting all of them directly into the gateway server [boxes in datacenter] in the cvars ip and net_address it displays to me the external ip , obviously the only ip in the box.
So i want something to cover both cases... is anything else exists from this 2 vars?

Sylwester 04-29-2011 17:36

Re: Get Server's IP
 
example of getting server external ip:
http://forums.alliedmods.net/showthr...96#post1157296

avril-lavigne 04-29-2011 23:45

Re: Get Server's IP
 
you dont have external IP ?
my net_address returns my real external IP:port


All times are GMT -4. The time now is 04:24.

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