set topic1 "TOPIC1" set topic2 "TOPIC2" bind pub - !nextstatus pub:topic set serv_chan "#canal" proc pub:topic {nick uhost hand chan args} { global serv_chan topic1 switch -exact -- [lindex $text 0] { on {putquick "TOPIC $chan :$topic1"} off {putquick "TOPIC $chan :$topic2"} if {[botisop $chan] == 1} { } else { putmsg $chan "Op me first!"} return 1 } }