; // Diablo 2 GameIP Viewer v1.0 by Nenzo@QuakeNET alias d2ip { var %i 1,%f net,%x,%r write a.bat @netstat -n > $+(",$mircdir,%f,") | run -n a.bat sleep 500 while (%i < $lines(%f)) { var %x = $read(%f,%i) if (%x) && ($gettok($gettok(%x,3,32),2,58) == 4000) { echo -a $timestamp [8d2@7bNet] Connected to $gettok(%x,3,32) $+ . | var %r 1 } inc %i } .remove a.bat | .remove %f if (!%r) { echo -a $timestamp [8d2@7bNet] You are not in any games right now. } } alias -l sleep { var %a = $ticks $+ .wsf write %a .comopen %a WScript.Shell if !$comerr { .comclose %a $com(%a,Run,3,bstr,%a,uint,0,bool,true) } .remove %a } menu channel,query { - Diablo 2 GameIP:d2ip }