| View previous topic :: View next topic |
| Author |
Message |
ege Voice
Joined: 25 Jul 2013 Posts: 6
|
Posted: Thu Jul 25, 2013 10:29 pm Post subject: Need help to set User Defined channel set for a tcl |
|
|
hello,
is it possible to set any tcl to run user defined channels ?
with " setudef " syntax ?
for example for this !learn.tcl :
https://pastee.org/sxdag
thank u |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Jul 26, 2013 8:38 am Post subject: |
|
|
Yes it can be made
But the script works with a single database so if you add something it will have the same database on all channel where the script is activated.
What you need is line
| Code: | | setudef flag explain |
and
| Code: | | if {![channel get $chan explain]} { return } |
at every proc (only the second line) you want to work only if +explain is set on the channel
You could take a look at this script http://forum.egghelp.org/viewtopic.php?t=19313 it works exactly as learn.tcl but it can have database for every channel and it can be activated/deactivated _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
ege Voice
Joined: 25 Jul 2013 Posts: 6
|
Posted: Fri Jul 26, 2013 10:28 pm Post subject: |
|
|
thank u a lot Madalin..
so if i add those 2 lines if i apply the command .chanset #chan +explain it will specify the channel right ?
and will this script work for all kind of tcl scripts ?
thank u  |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Jul 27, 2013 3:44 am Post subject: |
|
|
Yes does two lines of code can work on any other tcl that doesnt have a 'chanset' but you have to change 'explain' to whatever else. Anyway as i said your explain script will have the same database on every channel so the part with enable/disable the script on a specified channel is only for disableing the commands. _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
|
| Back to top |
|
 |
|