changeset 87:97c56d1e9ce2

urllog: Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 12 Sep 2011 01:52:05 +0300
parents 4c2b6482c08c
children 7ed449f9b848
files urllog.tcl
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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
     }
   }