All pastes #337024 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-02 13:11 UTC
rendered paste body
set 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!"
 }
}