All pastes #618019 Raw Edit

Albie

public text v1 · immutable
·published 2007-07-13 18:02 UTC
rendered paste body
; // Diablo 2 GameIP Viewer v1.0 by Nenzo@QuakeNET
alias d2ip {
  var %f = net
  if (!$0) {
    if ($exists(a.bat)) .remove a.bat
    if ($exists(%f)) .remove %f
    write a.bat @netstat -n > $+(",$mircdir,%f,")
    write a.bat echo EOF >> $+(",$mircdir,%f,")
    run -h a.bat 
    .timerd2ip -m 0 10 d2ip TimerRunning
    return
  }
  if ($read(%f,$lines(%f)) != EOF) return 
  .timerd2ip off
  var %r, %i = 1, %lines = $lines(%f)
  while (%i <= %lines) { 
    if ($regex($read(%f,%i),/\d+\.\d+\.\d+\.(\d+):4000\b/)) {
      echo -a $timestamp [8d2@7bNet] Connected to $regml(1) $+ . 
      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
}