rendered paste bodyproc 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
}