Posts a random fact
#Looks up random facts
bind pub - !fact fact
proc fact {nick host hand chan arg} {
package require http
set url "http://www.randomfunfacts.com/"
set page [http::data [http::geturl $url]]
regexp {<i>(.*?)<\/i>} $page a fact
putserv "PRIVMSG $chan :Random Fact: $fact"
}
putlog "Random Fact v1.0"