rendered paste bodyon *:TEXT:!ambcheck on on:#thepc.verify:{
if ($nick isop $chan) || ($nick ishop $chan) {
set %check on
notice $nick I will now check users as they join #Thepc.Verify.
}
}
on *:TEXT:!ambcheck off off:#Thepc.verify:{
if ($nick isop $chan) || ($nick ishop $chan) {
set %check off
notice $nick I will now not check users as they join #thepc.verify.
}
}
on *:JOIN:#Thepc.verify:{
if (%check == off) { halt }
if (%check == on) {
if ($nick == $me) || ($nick isop $chan) || ($nick ishop $chan) && ($nick !ison $chan) { Halt }
set %channy $chan
set %user $nick
set %pc.msg msg $chan
sockopen pestkick www.slushpuppy.silverinterlocution.org 80
}
}
on *:SOCKOPEN:pestkick*:{
sockwrite -nt $sockname GET /pestcontrol.php?pestcontrol= $+ %user HTTP/1.1
sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:pestkick*:{
var %sockread
sockread %sockread
if (<b> isin %sockread) {
set %attack $gettok($htmlfree(%sockread),4,32)
set %strength $gettok($htmlfree(%sockread),8,32)
}
if (<br> isin %sockread) {
var %combat = $htmlfree(%sockread)
if (%user isop %channy) || (%user ishop %channy) { halt }
if (%combat >= 105) || ($calc(%attack + %strength) >= 175) { %pc.msg 4PASSED 14[07 $+ %user $+ 14]4: 14Combat4: %combat 14Attack4: %attack 14Strength7: %strength 14Combined Atk & Str4: $calc(%attack + %strength) | mode %channy +v %user | notice %user 14Type 4!users 14and pm one of them on runescape to verify4. }
if (%combat < 105) || ($calc(%attack + %strength) < 175) { %pc.msg 4FAILED 14[04 $+ %user $+ 14]4:14 Combat7: %combat 14Attack4: %attack 14Strength4: %strength 14Combined Atk & Str4: $calc(%attack + %strength)
sockclose $sockname | unset %combat.3 | unset %channy | unset %user | unset %attack | unset %strength | unset %pc.msg
}
}
}
on *:Sockclose:pestkick*:{
Sockclose $sockname
unset %combat | unset %channy | unset %user | unset %attack | unset %strength | unset %pc.msg
}
alias -l htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x }
alias -l htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x