mIRC Home    About    Download    Register    News    Help

Print Thread
#229890 19/02/11 05:39 AM
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Is there an easy way to get the local ip address? I'm updating a client/server script that is used over lan and I'd like to get the local lan ip.


http://scripting.pball.win
My personal site with some scripts I've released.
pball #229892 19/02/11 06:12 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Have you tried the $ip identifier?

Tomao #229897 19/02/11 05:22 PM
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
that gets the external ip, if by chance it gets your local ip that is just random chance. Well not random but it does that when it doesn't resolve your external ip or something like that.

so $ip won't work


http://scripting.pball.win
My personal site with some scripts I've released.
pball #229898 19/02/11 06:17 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
You have to use /localinfo -h in order to fill $ip with your local ip


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #229943 20/02/11 05:18 PM
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Thanks for that info, didn't know there was a way to change that via script.

Now I just need to add that to my script


http://scripting.pball.win
My personal site with some scripts I've released.

Link Copied to Clipboard