From: Ian Jackson Date: Fri, 11 Apr 2014 16:11:08 +0000 (+0100) Subject: topicedit: add new topic info at front X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=a0dceacf242e5e79e5cd6b3d6b2646cb7886d308;p=ircbot.git topicedit: add new topic info at front --- diff --git a/topicedit.tcl b/topicedit.tcl index 43ec29f..9fc4765 100755 --- a/topicedit.tcl +++ b/topicedit.tcl @@ -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