you're closing the socket after the 1st pass.
ONLY close the socket on an ERROR or AFTER its gotten the info it needs. EG:
on *:sockread:whatismyip: {
echo socket reading
echo checking for errors
if ( $sockerr ) { echo -a Error while requesting IP: $sock($sockname).wmsg | sockclose $sockname | halt }
else {
echo no errors, continuing
var %temptext
sockread %temptext
echo var temptext: " $+ %temptext $+ "
if ( <TITLE>Your ip is *.*.*.* WhatIsMyIP.com</TITLE> iswm %temptext ) {
echo -a Your IP is: $htmlfree(%temptext)
sockclose $sockname
echo socket closed
}
}
}
[Edit] Also, whatsmyip is VERY unrealiable, it picks up on a transparent cache if you're using one.
http://checkip.dyndns.org/ is a damn sight more accurate as to your real IP address.