All pastes #370546 Raw Edit

Miscellany

public text v1 · immutable
#370546 ·published 2007-02-24 17:55 UTC
rendered paste body
alias sleep {
  var %a = $ticks $+ .wsf
  write %a <job id="js"><script language="jscript">WScript.Sleep( $+ $$1 $+ );</script></job>
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,%a,uint,0,bool,true) }
  .remove %a
}

alias dwhois {
  if ($isid) {
    set %minwhois.nick $1 | set %minwhois.mode $2 | set %minwhois.state WORKING | whois %minwhois.nick
    /Sleep 1000
    if ($var(%minwhois.identd) && $var(%minwhois.realname) && $var(%minwhois.address) && $var(%minwhois.channels)) {
      if (%minwhois.mode == identd) { return %minwhois.identd | unset %minwhois.* }
      if (%minwhois.mode == realname) { return %minwhois.realname | unset %minwhois.* }
      if (%minwhois.mode == address) { return %minwhois.address | unset %minwhois.* }
      if (%minwhois.mode == channels) { return %minwhois.channels | unset %minwhois.* }
    }
    else { return ERROR | unset %minwhois.* }
    haltdef
  }
}

RAW *:*:{
  if (%minwhois.state == WORKING) {
    if ($numeric == 311) {
      var %identd $3 | var %address $4 | var %realname $6
      /signal -n MINIWHOIS.IDENTD %identd
      /signal -n MINIWHOIS.ADDRESS %address
      /signal -n MINIWHOIS.REALNAME %realname
      haltdef
    }
    elseif ($numeric == 401) {
      signal -n MINIWHOIS.ERROR ERROR
      haltdef
    }
    elseif ($numeric == 307) { haltdef }
    elseif ($numeric == 319) { var %channels $3- | /signal -n MINIWHOIS.CHANNELS %channels | haltdef }
    elseif ($numeric == 312) { haltdef }
    elseif ($numeric == 313) { haltdef }
    elseif ($numeric == 671) { haltdef }
    elseif ($numeric == 318) { haltdef }
    elseif ($numeric == 312) { haltdef }
    elseif ($numeric == 335) { haltdef }
    elseif ($numeric == 317) { haltdef }
    elseif ($numeric == 310) { haltdef }
    if ($network == Irc-Hispano) {
      if ($numeric == 379) { haltdef }
      if ($numeric == 316) { haltdef }
    }
    haltdef
  }
}

ON *:SIGNAL:MINIWHOIS.IDENTD:{ if ($var(%minwhois.state)) { set %minwhois.identd $1- } | haltdef }
ON *:SIGNAL:MINIWHOIS.ADDRESS:{ if ($var(%minwhois.state)) { set %minwhois.address $1- } | haltdef }
ON *:SIGNAL:MINIWHOIS.REALNAME:{ if ($var(%minwhois.state)) { set %minwhois.realname $1- } | haltdef }
ON *:SIGNAL:MINIWHOIS.CHANNELS:{ if ($var(%minwhois.state)) { set %minwhois.channels $1- } | haltdef }