chiark / gitweb /
topicedit: add new topic info at front
[ircbot.git] / topicedit.tcl
index 43ec29f9aa78674147d927fad085baca80061202..9fc4765285ce61bc85196746f5288daae062a64e 100755 (executable)
@@ -43,7 +43,8 @@ proc msg_333 {server code us channel setter when} {
 }
 proc msg_366 {args} {
     global oldtopic topicinfo channel done
-    set newtopic "$oldtopic | $topicinfo"
+    if {![info exists oldtopic]} return
+    set newtopic "$topicinfo | $oldtopic"
     sendout TOPIC $channel $newtopic
     sendout TOPIC $channel
     set done 1