All pastes #555680 Raw Edit

Something

public text v1 · immutable
·published 2007-06-10 12:13 UTC
rendered paste body
alias -l c1 return $+($chr(3),12,$1-,)
alias -l c2 return $+($chr(3),07,$1-,)
alias -l c3 return $+($chr(3),04,$1-,)
on $*:TEXT:/^[!@.]cla(ns|n)/Si:#:{
  inc %s
  set $+(%,return.,%s) $iif($left($1,1) == @, msg $chan, notice $nick)
  set $+(%,clan.,%s) $2-
  sockopen $+(clan.,%s) www.runehead.com 80
}
on *:SOCKOPEN:clan.*: {
  var %s = $gettok($sockname,2,46)
  sockwrite -nt $sockname GET /clans/search.php?search= $+ %clan. [ $+ [ %s ] ] $+ &searchtype=exact HTTP/1.1
  sockwrite -nt $sockname Host: www.runehead.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:clan.*: {
  var %s = $gettok($sockname,2,46)
  if ($sockerr) {
    %return. [ $+ [ %s ] ] Socket error, please report this to $me $+ .
    halt
  }
  var %read
  sockread %read
  if ($regex(results,%read,/<p>No results were found for the <b>exact</b> search <b>(.*)</b/)) {
    %return. [ $+ [ %s ] ] $c2 $+ %clan. [ $+ [ %s ] ] $c1 $+ is currently in no clan $c2 $+ on www.runehead.com/clans
    unset $+(%,clan.*)
    sockclose $+(clan.,%s)
  }
  if ($regex(results,%read,/<p>The <b>exact<\/b> search <b>(.*)<\/b> returned <b>(\d+)/)) {
    %return. [ $+ [ %s ] ] $c1 $+ There were $regml(results,2) $c2 $+ result(s) for: %clan. [ $+ [ %s ] ]
  }
  if ($regex(clan,%read,/<td class='tableborder'><a href='(.*)'>(.*)</a></td>/)) {
    inc $+(%,clan.count.,%d)
    if ($($+(%,clan.count.,%d),2) >= 4) {
      %return. [ $+ [ %s ] ] $c1 $+ There were more as $c3 $+ 4 $c2 results for %clan. [ $+ [ %s ] ] $+ , script halts.
      unset $+(%,clan.*)
      sockclose $+(clan.,%s)
    }
    else {
      %return. [ $+ [ %s ] ] $c2 $+ %clan. [ $+ [ %s ] ] is $+ $c1 currently in the clan: $c2 $+ $regml(clan,2) $+ ! $c1 Memberlist is found at: $c2 $+ $+(http://runehead.com/clans/,$regml(clan,1))
    }
  }
  if (</html> isin %read) {
    unset $+(%,clan.*)
    sockclose $+(clan.,%s)
  }
}
alias wc1 { return $+(14,$1-) } 
alias wc2 { return $+(04,$1-) }
alias wc3 { return $+(07,$1-) }
on *:TEXT:!whois on*:#: {
  if ($nick isop $chan) || ($nick ishop $chan) || ($nick == [-God-]) {
    if (%whois) {
      notice $nick $wc1 Whois check is already on for $wc2 $+ $chan
    }
    else {
      set %whois $addtok(%channel,$chan,44)
      msg $chan $wc1 $+ Whois check is now on for $wc2 $+ $chan
    }
  }
}
on *:TEXT:!whois off*:#: {
  if ($nick isop $chan) || ($nick ishop $chan) || ($nick == [-God-]) {
    if (%whois) { 
      set %whois $remtok(%channel,$chan,1,44)
      msg $chan $wc1 $+ Whois check is now off for $wc2 $+ $chan
    }     
    else { 
      notice $nick $wc1 $+ Whois check is not on for $wc2 $+ $chan    
    }  
  }
}
on *:JOIN:%whois: {
  whois $nick
  set %msgchan msg $chan
  set %nick $nick
}
raw 319:*:{
  %msgchan $wc1 $+ %nick is on: - $wc3 $+ $replace($3-,$chr(43),$chr(32))
  unset %chan
  unset %nick
}
ON *:TEXT:brb*:#:{ if ($2 == $null) {
    set %away $+ $nick $nick
    set %why $+ $nick N/a
    set %tim $+ $nick $ctime
    msg $chan 4 $+ $nick Will be right back:2 N/a 
    halt
  }
  else {
    set %away $+ $nick $nick
    set %why $+ $nick $2-
    set %tim $+ $nick $ctime
    msg $chan $nick 4Will be right back:2 $2-
  }
}
ON *:TEXT:*back*:#:{ if (%away [ $+ [ $nick ] ] == $nick) {
    msg $chan 4 $+ $nick $+ , Welcome back from2 %why [ $+ [ $nick ] ] $+ 4. You where gone for2 $duration($calc( $ctime - %tim [ $+ [ $nick ] ] ))
    unset %away $+ $nick
    unset %why $+ $nick
    unset %tim $+ $nick  
  }
}
on *:TEXT:@8ball*:#:{ 
  if ($2 == $null) {
    /msg $chan type @8ball 4[qeustion no empty spaces]
  }
  else {
    /set %8ball $rand(1,7) 
    if (%8ball == 1) msg $chan 12the 8ball is rolling and the answer is.. :::4Nooo! 
    if (%8ball == 2) msg $chan 12the 8ball is rolling and the answer is.. :::13mmh, Yes 
    if (%8ball == 3) msg $chan 12the 8ball is rolling and the answer is.. :::11well... Maybe 
    if (%8ball == 4) msg $chan 12the 8ball is rolling and the answer is.. :::8haha! of course !
    if (%8ball == 5) msg $chan 12the 8ball is rolling and the answer is.. :::7Are you crazy?!?! Dude -.-
    if (%8ball == 6) msg $chan 12the 8ball is rolling and the answer is.. :::9ermm, How should I know? 
    if (%8ball == 7) msg $chan 12the 8ball is rolling and the answer is.. ::: 7,5 What The?? what are u thinking? that i'm an idiot or something?:O of course! 4 NOT!
  }