Hi
someone tcl script for public command !chanset ?
Thanks.
Code: Select all
proc chanset:pub {nick uhost hand chan text} {
set chanset [lindex [split $text] 0]
if {[regexp {^(\+|-)} "$chanset"]} {
set result [catch {channel set $chan $chanset} error]
if {$result == 1} {
puthelp "NOTICE $nick :error trying to set modes \{ $chanset \} on $chan: $error"
return 0
} else {
puthelp "NOTICE $nick :Successfully set modes \{ $chanset \} on $chan"
return 1
}
} else {
set option [join [lrange [split $text] 1 end]]
set result [catch {channel set $chan $chanset $option} error]
if {$result == 1} {
puthelp "NOTICE $nick :error trying to set modes \{ $chanset $option \} on $chan: $error"
return 0
} else {
puthelp "NOTICE $nick :Successfully set modes \{ $chanset $option \} on $chan"
return 1
}
}
}