Aucun50 commented on a Page, random facts socket  -  Nov 25, 2010

Maybe you could make use of the sockmark command and get rid of that var.

alias rdmfact {
  sockopen randomfact www.randomfunfacts.com 80
  sockmark randomfact msg $active 12,1[4,1Random Facts12,1]
}
on *:sockopen:randomfact: {
  sockwrite -n $sockname GET / HTTP/1.1
  sockwrite -n $sockname Host: $+($sock(randomfact).addr,$str($crlf,2))
}
on *:sockread:randomfact: {
  var %randomfact | sockread %randomfact 
  if ( *<i>* iswm %randomfact) {
    $sock(randomfact).mark $remove(%randomfact,<i>,</i>,</strong>,</font>,&nbsp;,</td>,<strong>)
    sockclose randomfact
  }
}
 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.