All pastes #23157 Raw Edit

Anonymous

public text v1 · immutable
#23157 ·published 2005-09-17 00:45 UTC
rendered paste body
proc addchannel {channel chanmodes topic} {
  global defchanoptions
  if {[lsearch [string tolower [channels]] [string tolower $channel]] >= 0} {return 0}
  set needop "need-op \{\}"
  set needinvite "need-invite \{\}"
  set defchanoptions {chanmode "+nt" idle-kick 0}
  set dchanoptions $defchanoptions
  set options [concat $dchanoptions $needop $needinvite]
  channel add $channel $options
  foreach option $chanmodes {
    channel set $channel $option
  }
  if {$topic != ""} {
    putserv "TOPIC $channel :$topic"
  }
  savechannels
  return 1
}