All pastes #491899 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-16 22:18 UTC
rendered paste body
The Cc thing msgs the channel instead of the person. Can you please make it notice the person instead? Tyvm :D (I didnt put all the CC values so it doesnt confuse you coz im messy)
alias -l c1 { return $+($chr(3),12,$1-,$chr(3)) }
alias -l c2 { return $+($chr(3),04,$1-,$chr(3)) }
alias -l c3 { return $+($chr(3),06,$1-,$chr(3)) }
alias -l c4 { return $+($chr(3),02,$1-,$chr(3)) }
alias -l c5 { return $+($chr(3),03,$1-,$chr(3)) }
on $*:text:/^[!@.](cc|combatcheck)/Si:#:{
  if (%allstats [ $+ [ $chan ] ] == off) { HALT } {
    inc %id
    if ($len($2) > 12) { %output.cc $c1( 6¤4 $2 12's name is too long) 6¤ | halt } 
    set $+(%,pc.chan.,%id) $chan
    set $+(%,pc.rsn.,%id) $2 
    set %nick $nick
    sockopen $+(pest.,%id) www.slushpuppy.silverinterlocution.org 80 
  }  
}
on *:SOCKOPEN:pest.*:{ 
  var %id = $gettok($sockname,2,46)
  sockwrite -n $sockname GET /pestcontrol.php?pestcontrol= $+ $($+(%,pc.rsn.,%id),2) HTTP/1.1 
  sockwrite -n $sockname Host: www.slushpuppy.silverinterlocution.org 
  sockwrite -n $sockname $+($crlf,$crlf) 
} 
on *:SOCKREAD:pest.*:{ 
  var %id = $gettok($sockname,2,46), $&
    %rsn = $($+(%,pc.rsn.,%id),2), $& 
    %chan = $($+(pc.chan.,%id),2)
  if ($sockerr) { 
    %output.cc Sockerr: $sockerr 
    unset $+(%,pc.*) 
    sockclose $sockname 
    halt
  } 
  else { 
    var %read 
    sockread %read 
    if (*<i>* iswm %read) { set %pc.cmbstyle $htmlfree(%read) }
    if (*<b>* iswm %read) { 
      tokenize 32 $nohtml(%read) 
      set $+(%,pc.info.,%id) $4 $6 $8 $10 $12 $14 $16  
    } 
    if (*<br>* iswm %read) {
      if ($chan != #pest-time) {
        var %cmb = $nohtml(%read) 
        tokenize 32 $($+(%,pc.info.,%id),2)
        notice %nick $c3(¤ Rsn:) %rsn %cmb $3 $c3(¤)
      }
      unset $+(%,pc.*) 
      sockclose $sockname
    }
  } 
}
alias -l nohtml { 
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) 
  return %x 
}