You have to use /localinfo -h in order to fill $ip with your local ip


#mircscripting @ irc.swiftirc.net == the best mIRC help channel