FordLawnmower commented on a Page, Random Chuck Norris fact  -  Jul 14, 2009

I don't think that site has a /browse/ and $2 does not exist at that point in the script.
4q.cc is just a web site. It just does what it does ;/
If you go to the website you will see it has chuck norris, vin diesel, mr. T and All. You could add vin diesel, mr T and all if you changed the script a little.

on $*:TEXT:/^[!.@](chuck|vin|mrt|all)/Si:#: {
  if ($sock(chuck)) sockclose chuck
  sockopen chuck 4q.cc 80
  sockmark chuck $regml(1) 0
  set %chuck.msg $iif($mid($1,1,1) == $chr(64),msg #,.notice $nick) 
}
on *:sockopen:chuck: { 
  if ($sockerr) HALT 
  else { 
    sockwrite -n $sockname GET $+(/index.php?pid=fact&person=,$gettok($sock($sockname).mark,1,32)) HTTP/1.1 
    sockwrite -n $sockname HOST: 4q.cc 
    sockwrite -n $sockname $crlf 
  }
}
on *:sockread:chuck: {
  if ($sockerr) HALT 
  else {
    sockread %chuck 
    if (<div id="factbox"> isin %chuck) { sockmark $sockname $puttok($sock($sockname).mark,1,2,32) }
    if (*</div>* iswm %chuck) && ($gettok($sock($sockname).mark,2,32)) {
      %chuck.msg $+(12[04,$upper($gettok($sock($sockname).mark,1,32)),12]) $replace($htmlfree(%chuck),&quot;,")
      unset %chuck.*
      sockclose $sockname
    } 
  } 
}
alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) | return %x }

With this you could search !chuck !vin !mrt or !all
I don't think the site has anymore than that ;/

 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.