All pastes #1191 Raw Edit

Anonymous

public text v1 · immutable
#1191 ·published 2004-10-01 12:35 UTC
rendered paste body
#mIRC bot $uhost(nickname)

alias uhost {
  var %scan.ial = $address($1,5))
  if .users.quakenet.org isin %scan.ial { return $address($1,2) }
  if .dip.t-dialin.net isin %scan.ial || aol isin %scan.ial { return $address($1,3) }
  else { return $address($1,1) }
}

#sock bot $s_uh(nick!idendt@host)
alias s_uh {
  var %shost $gettok($1, 2, 64)
  var %snick $gettok($1, 1, 33)
  var %sident $gettok($gettok($1, 2, 33), 1, 64)
  if $prop == ident { return %sident | halt }
  if $prop == nick { return %snick | halt }
  if $prop == host { return %shost | halt }
  if .users.quakenet.org isin %shost { 
    return $($chr(42) $+ $chr(33) $+ $chr(42) $+ $chr(64) $+ %shost) 
  }
  elseif .dip.t-dialin.net isin %host || aol.com isin %host { 
    return $($chr(42) $+ $chr(33) $+ %sident $+ $chr(64) $+ $chr(42) $+ $chr(46) $+ $gettok(%shost, 2-, 46)) 
  }
  else { 
    if $gettok(%shost, 0, 46) <= 2 {
      return $($chr(42) $+ $chr(33) $+ %sident $+ $chr(64) $+ %shost)
    }
    elseif $gettok(%shost, 0, 46) >= 3 {
      return $($chr(42) $+ $chr(33) $+ %sident $+ $chr(64) $+ $chr(42) $+ $chr(46) $+ $gettok(%shost, 2-, 46))
    }
  }
}