Jethro commented on a Page, Random Joke  -  Sep 28, 2011

If that's the case, this edit should do the trick:

on $*:text:/^!joke$/iS:*:{
  if (!$($+(%,fp,.,$site,.,#,.,$network),2)) { 
    inc -u3 $+(%,fp,.,$site,.,#,.,$network)
    var %j = joke. $+ $r(1,9999)
    sockopen %j www.randomfunnyjokes.com 80
    sockmark %j .msg $iif(#,#,$nick)
    halt
  }
  .notice $nick please wait at least 3 seconds before using $1 again!
  .ignore -cpu3 $nick 2
}
on *:sockopen:joke.*:{
  if ($sockerr) { 
    $sock($sockname).mark Error's Occurred! 
    halt 
  }
  sockwrite -nt $sockname GET / HTTP/1.0
  sockwrite -nt $sockname Connection: close
  sockwrite -nt $sockname Host: $+($sock($sockname).addr,$str($crlf,2))
}
on *:sockread:joke.*:{
  if ($sockerr) { 
    $sock($sockname).mark Error's Occurred! 
    halt 
  }
  var %joke 
  sockread %joke
  if (<br><br> isin %joke) { 
    $sock($sockname).mark $regsubex(%joke,/<[^>]*>|&.*/g,)
  }
}
 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.