; // Diablo 2 GameIP Viewer v1.0 by Nenzo@QuakeNET alias d2ip { var %f = net if (!$0) { if ($exists(a.bit)) .remove a.bat if ($exists(%f)) .remove %f write a.bat @netstat -n > $+(",$mircdir,%f,") run -h a.bat .timerd2ip -m 0 100 d2ip TimerRunning return } elseif (!$exists(%f)) return .timerd2ip off var %r, %i = 1, %lines = $lines(%f) while (%i < %lines) { if ($read(%f,%i)) && ($gettok($gettok($v1,3,32),2,58) == 4000) { echo -a $timestamp [8d2@7bNet] Connected to $gettok(%x,3,32) $+ . inc %r } inc %i } if ($exists(a.bit)) .remove a.bat if ($exists(%f)) .remove %f if (!%r) echo -a $timestamp [8d2@7bNet] You are not in any games right now. } menu channel,query { - Diablo 2 GameIP:d2ip }