Jethro commented on a Page, Kings Of Chaos Stats Checker.  -  Mar 12, 2011

Nice effort, Linuxuser, with the socket. One helpful advice for you is to use the /sockmark command instead of setting a bunch of global variables:

on *:text:$($iif(!stats * iswm $1,$1)):#:{
  if !%f { set -z %f 5
    sockopen mstats www.relentless.ws 80
    sockmark mstats $+(/mstats.php?n=,$2,-,msg #,-,$2,-,/All|Act|Ra|Fo|St|per|Unt|Cov/)
  }
}
on *:SOCKOPEN:mstats:{
  tokenize 45 $sock(mstats).mark
  sockwrite -nt $sockname GET $1 HTTP/1.1                                  
  sockwrite -nt $sockname Host: $+($sock(mstats).addr,$str($crlf,2))
  sockwrite -nt $sockname Connection: close
}
on *:SOCKREAD:mstats:{
  tokenize 45 $sock(mstats).mark
  var %mstats | sockread %mstats
  if ($regex(%mstats,$4)) {
    $2 12 %mstats
  }
}

it does look a lot cleaner, doesn't it? No timer is necessary...
Although the script gets a bit bigger, it's better this way.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.