chiark / gitweb /
Do not tell people when *we* reset the topic.
[ircbot] / bot.tcl
diff --git a/bot.tcl b/bot.tcl
index bbee0a0b86e6643117a3e9414885eea97cfd9470..d5afa81a3e3e146d3bdc6edf3a1bd8ec7b68cbe3 100755 (executable)
--- a/bot.tcl
+++ b/bot.tcl
@@ -415,11 +415,7 @@ proc recordlastseen_n {n how here} {
 }
 
 proc note_topic {showoff whoby topic} {
-    if {[string length $whoby]} {
-       set msg "FYI, $whoby has changed the topic on $showoff"
-    } else {
-       set msg "FYI, I have reset the topic on $showoff"
-    }
+    set msg "FYI, $whoby has changed the topic on $showoff"
     if {[string length $topic] < 160} {
        append msg " to $topic"
     } else {
@@ -432,10 +428,8 @@ proc note_topic {showoff whoby topic} {
     } else {
        set tryspies $tell
     }
-puts "NT>showoff $showoff|whoby $whoby|topic $topic|tell $tell|tryspies $tryspies|msg $msg<"
     foreach spy $tryspies {
        set see [chandb_get $spy topicsee]
-puts "NT>spy $spy|see $see<"
        if {[lsearch -exact $see $showoff] >= 0 || \
                ([lsearch -exact $see *] >= 0 && \
                [lsearch -exact $tell $spy] >= 0)} {
@@ -528,7 +522,7 @@ proc check_justme {lchan} {
     global nick
     upvar #0 chan_nicks($lchan) nlist
     if {[llength $nlist] != 1} return
-    if {"[lindex $nlist 0]" != "$nick"} return
+    if {"[lindex $nlist 0]" != "[irctolower $nick]"} return
     if {[chandb_exists $lchan]} {
        set mode [chandb_get $lchan mode]
        if {"$mode" != "*"} {
@@ -537,7 +531,6 @@ proc check_justme {lchan} {
        set topic [chandb_get $lchan topicset]
        if {[string length $topic]} {
            sendout TOPIC $lchan $topic
-           note_topic $lchan {} $topic
        }
     } else {
        sendout PART $lchan