| View previous topic :: View next topic |
| Author |
Message |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Fri Dec 09, 2011 6:10 am Post subject: on / off switch via console |
|
|
Hi everyone
Hopefully someone can help me on that. Ive a small script, that needs an on/off switch for a specific command.
In the following example id like to have eg:
.chanset !this off
like this
| Code: |
proc beta_recv {from command text} {
set type [lindex [split $text] 0]
switch $type {
"!this" { sendmsg #chan "$text" }
"!that" { sendmsg #chan "$text" }
"!somethg" { sendmsg #chan "$text" }
}
}
|
Would be awesome, if someone would write that for me
Thanks a lot |
|
| Back to top |
|
 |
Johannes13 Halfop
Joined: 10 Oct 2010 Posts: 46
|
Posted: Tue Jan 31, 2012 2:08 pm Post subject: |
|
|
setudef flag !this
set it with .chanset +!this or .chanset -!this
check it in the script with [channel get $channel !this] |
|
| Back to top |
|
 |
|