rendered paste bodyon *:TEXT:!forum:#: {
set %msgnick $nick
if $sock(Techefx) { sockclose Techefx }
sockopen Techefx techefx.com 80
}
on *:sockopen:Techefx:{
sockwrite -n $sockname GET /forums/ HTTP/1.1
sockwrite -n $sockname Host: techefx.com $+ $crlf $+ $crlf
}
on *:sockread:Techefx:{
if ($sockerr) {
notice $nick Socket Error
halt
}
var %output
sockread %output
%output = $htmlfree(%output)
if (*Our members have made a total of * posts* iswm %output) { set %posts %output }
}
on *:SOCKCLOSE:techefx: {
notice %msgnick 12[ Board Statistics ] %posts %members %newmember
unsetvars
}
alias unsetvars {
unset %msgnick
unset %posts
unset %members
unset %newmember
unset %msg
}
alias htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}