Anonymous
public text v1 · immutableset topic1 "TOPIC1"
set topic2 "TOPIC2"
bind pub - !nextstatus pub:topic
set serv_chan "#canal"
proc pub:topic {nick uhost hand chan text} {
global serv_chan topic1 topic2
if {[botisop $chan]} {
switch -exact -- [lindex $text 0] {
on {putquick "TOPIC $chan :$topic1"}
off {putquick "TOPIC $chan :$topic2"}
}
} else {
puthelp "privmsg $chan :Op me first!"
}
}