| View previous topic :: View next topic |
| Author |
Message |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Fri Jan 29, 2010 6:01 pm Post subject: !chanset (pub) |
|
|
Hi
someone tcl script for public command !chanset ?
Thanks. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Jan 29, 2010 10:44 pm Post subject: |
|
|
| Code: | 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
}
}
} | Its basic, dont have the time to work on it as a script. But am sure you or someone else can "modify" it to suit your taste  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
|