# HG changeset patch # User Matti Hamalainen # Date 1315781525 -10800 # Node ID 97c56d1e9ce2e90891f0a9277f2cb90e27ae0209 # Parent 4c2b6482c08c348774e64ada114989280b3efdca urllog: Cleanups. diff -r 4c2b6482c08c -r 97c56d1e9ce2 urllog.tcl --- a/urllog.tcl Mon Sep 12 01:50:53 2011 +0300 +++ b/urllog.tcl Mon Sep 12 01:52:05 2011 +0300 @@ -357,9 +357,6 @@ global urlmsg_timeout urlmsg_errorgettingdoc urllog_httprep global urllog_shorturl_prefix urllog_shorturl urllog_encoding - ### Print status to bot's log - urllog_log "$urlStr ($urlNick@$urlChan)" - ### Try to determine the URL protocol component (if it is missing) set u_checktld 1 if {[string match "*www.*" $urlStr] && ![string match "http://*" $urlStr] && ![string match "https://*" $urlStr]} { @@ -532,17 +529,17 @@ #------------------------------------------------------------------------- -proc urllog_checkmsg {nick uhost hand chan text} { +proc urllog_checkmsg {unick uhost uhand uchan utext} { ### Check the nick - if {$nick == "*"} { + if {$unick == "*"} { urllog_log "urllog_checkmsg: nick was wc, this should not happen." return 0 } ### Do the URL checking - foreach istr [split $text " "] { - if {[regexp "(ftp|http|https)://|www\..+|ftp\..*" $istr]} { - urllog_checkurl $istr $nick $uhost $chan + foreach str [split $utext " "] { + if {[regexp "(ftp|http|https)://|www\..+|ftp\..*" $str]} { + urllog_checkurl $str $unick $uhost $uchan } }