chiark / gitweb /
No more debugging.
[ircbot] / bot.tcl
diff --git a/bot.tcl b/bot.tcl
index 0b12a54d1dcf2049be684f4f00f0dda95407a55a..e313f5b3cf702d0b511b537a5585c0bd15342f17 100755 (executable)
--- a/bot.tcl
+++ b/bot.tcl
@@ -432,10 +432,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)} {
@@ -1052,8 +1050,8 @@ def_chancmd autojoin {
        default { error "channel autojoin must be `yes' or `no' }
     }
     chandb_set $chan autojoin $nv
-    ucmdr [expr {$nv ? "I will join #chan when I'm restarted " : \
-           "I won't join #chan when I'm restarted "}] {}
+    ucmdr [expr {$nv ? "I will join $chan when I'm restarted " : \
+           "I won't join $chan when I'm restarted "}] {}
 }
 
 def_chancmd userinvite {
@@ -1085,7 +1083,7 @@ def_chancmd topic {
                error "you must specific the topic to set"
            }
            chandb_set $chan topicset $t
-           ucmdr "Whenever I'm alone on #chan, I'll set the topic to $t." {}
+           ucmdr "Whenever I'm alone on $chan, I'll set the topic to $t." {}
        }
        see - tell {
            ta_listop {
@@ -1127,13 +1125,7 @@ def_chancmd show {
        append l ", mode " [chandb_get $chan mode]
        append l ", userinvite " [chandb_get $chan userinvite] "."
        append l "\nManagers: "
-       append l [join [chandb_get $chan managers] " "] "\n"
-       set t [chandb_get $chan topicset]
-       if {[string length $t]} {
-           append l "Topic to set: $t"
-       } else {
-           append l "I will not change the topic."
-       }
+       append l [join [chandb_get $chan managers] " "]
        foreach {ts sep} {see "\n" tell "  "} {
            set t [chandb_get $chan topic$ts]
            append l $sep
@@ -1143,6 +1135,13 @@ def_chancmd show {
                append l "Topic $ts list is empty."
            }
        }
+       append l "\n"
+       set t [chandb_get $chan topicset]
+       if {[string length $t]} {
+           append l "Topic to set: $t"
+       } else {
+           append l "I will not change the topic."
+       }
        ucmdr {} $l
     } else {
        ucmdr {} "The channel $chan is not managed."