4 # ./topicedit.tcl SERVER PORT NICK IDENT FULLNAME CHANNEL TOPICINFO
8 manyset $argv host port nick ident ownfullname channel topicinfo
17 proc privmsg_unlogged {args} { return 1 }
18 proc msg_332 {server code us channel topic args} {
20 if {[string compare $nick $us]} return
23 proc msg_333 {server code us channel setter when} {
25 # might happen as a result of us connecting, or as a result of
27 set now [clock seconds]
28 if {![string compare $nick $setter] && $when > $now - 3600} {
33 puts stderr "*** topic recently set by us, not setting again!"
39 global oldtopic topicinfo channel done
40 set newtopic "$oldtopic | $topicinfo"
41 sendout TOPIC $channel $newtopic
42 sendout TOPIC $channel