proc pub:chanset {hand chan args x mix} { set mode [string tolower [lindex $args 0]] set opti [lindex $args 1] if {([regexp {^aop-delay|flood-(chan|deop|kick|join|nick|ctcp)$} $mode] && [regexp {^\d{1,2}\:\d{1,3}$} $opti]) || ([string equal $m$ [string equal $mode -inactive] && [channel get $chan suspended]} {a:tell $x 127 $chan ; return "FAILED: chan suspended ($chan)"$ [string equal $mode +suspended] && [check:m:gl $hand]} {channel set $chan +inactive +suspended} elseif { [string equal $mode -suspended] && [check:m:gl $hand]} {channel set $chan -inactive -suspended} elseif { [regexp {^[+-](auto(op|voice)|bitch|cycle|revenge(bot|)|dontkickops|nodesynch|(dynamic|enforce|user)bans|inactive|protect(frien$ [regexp -- {^(rules|url|faq|fuck|news|desc|mail|slap|kiss)$} $mode]} {if { [string equal $opti none] || $opti == ""} {set opti $ [string equal $mode mode] || [string equal $mode modes] && [regexp {^[ntrimlkprs+-]+$} $opti]} {channel set $chan chanmode $opt$ [string match {[-+]locked} $mode] && [check:N:gl $hand] } {channel set $chan $mode } else {a:help $x chanset ; return "FAILED: $ a:tell $x 126 "$chan $mode $opti" return "$mode $opti"