4 # ./topicedit.tcl SERVER PORT NICK IDENT FULLNAME CHANNEL TOPICINFO
8 manyset $argv host port nick ident ownfullname channel topicinfo
12 after 30000 { set errorInfo {}; bgerror timeout }
15 global errorInfo errorCode
16 puts stderr "$msg\n$errorCode\n$errorInfo\n\nERROR: $msg\n"
25 proc privmsg_unlogged {args} { return 1 }
26 proc msg_332 {server code us channel topic args} {
28 if {[string compare $nick $us]} return
31 proc msg_333 {server code us channel setter when} {
33 # might happen as a result of us connecting, or as a result of
35 set now [clock seconds]
36 if {![string compare $nick $setter] && $when > $now - 3600} {
41 puts stderr "*** topic recently set by us, not setting again!"
47 global oldtopic topicinfo channel done
48 if {![info exists oldtopic]} return
49 set newtopic "$topicinfo | $oldtopic"
50 sendout TOPIC $channel $newtopic
51 sendout TOPIC $channel