proc pub:news {nick uhost hand chan text} { putserv "PRIVMSG $chan :Fetching current news from NintendoXG.com" ## get the url and cleanup our token set data [::http::data [set tok [::http::geturl "http://site.nintendoxg.com/"]]]; ::http::cleanup $tok ## get our news items from the html foreach {x id title} [regexp -all -inline -- {(.+?)} $data] { ## show the info to irc...all we got from the regex was the id...so let's fill in the rest of the link puthelp "PRIVMSG $chan :$title \< http://site.nintendoxg.com/news.php\?mode=article\&id=$id \>" } ## that's it...we are done } bind pub - @news pub:news