All pastes #277631 Raw Edit

Probelm!!

public text v1 · immutable
·published 2006-12-13 13:07 UTC
rendered paste body
alias msactive sockopen forum mircscripts.org 80
on *:sockread:forum:{
if ($sockerr) {
echo -a Error.
halt
}
else {
var %'
sockread %'
if (<span class="smallText">Last 24 hours: * posts / * new users</span><br> iswm %') {
var %stripped = $nohtml(%'), %24 = $gettok(%stripped,4,32), %new = $gettok(%stripped,7,32)
; Right now we have %24 as the posts in the last 24 hours
; And %new as how many new users in the last 24 hours
window @hi
aline @hi %'
aline @hi Average of $round($calc(%24 /24),1) posts per hour
aline @hi Average of $round($calc(%new /24),2) new users every hour
sockclose $sockname
halt
}
}
}
alias -l nohtml {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
return %x
}
on *:sockopen:forum:{ 
sockwrite -n $sockname GET /forumlist.php HTTP/1.1 
sockwrite -n $sockname Host: mIRCscripts.org $+ $crlf $+ $crlf
}