| View previous topic :: View next topic |
| Author |
Message |
squeege Voice
Joined: 13 Jan 2012 Posts: 10
|
Posted: Wed Jan 25, 2012 5:50 pm Post subject: 2 TCL Files. 1 Trigger. |
|
|
Hi,
I am running eggdrop1.8 as i need ssl
Anyway.. this will probably happen on all versions.
I am wondering.. i need to trigger 2 scripts from one !trigger.
But at the moment. Only one will operate at a time and I cannot combine scripts Anyway to fix this?
Thanks,
Louis |
|
| Back to top |
|
 |
stormshadow Voice
Joined: 11 Mar 2011 Posts: 7
|
Posted: Fri Jan 27, 2012 1:05 am Post subject: details |
|
|
What do you mean by "trigger two scripts?"
Are you referring to procs? |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Jan 27, 2012 1:45 pm Post subject: Re: 2 TCL Files. 1 Trigger. |
|
|
| squeege wrote: | Hi,
I am running eggdrop1.8 as i need ssl
Anyway.. this will probably happen on all versions.
I am wondering.. i need to trigger 2 scripts from one !trigger.
But at the moment. Only one will operate at a time and I cannot combine scripts Anyway to fix this?
Thanks,
Louis |
| Code: | bind pub - !test wrapProcs
proc wrapProcs {nick uhost hand chan text} {
proc1 $nick $uhost $hand $chan $text
proc2 $nick $uhost $hand $chan $text
}
proc proc1 {nick uhost hand chan text} {
putserv "privmsg $chan :procedure 1 is active!"
}
proc proc2 {nick uhost hand chan text} {
putserv "privmsg $chan :procedure 2 is active!"
} |
You merely write a wrapper that will call both procedures in the order you want. Associate the bind then to this wrapper. The wrapper will ensure both procedures run. There are other ways to do this involving "return codes" that can accomplish it as well. But "wrapping" the two together is the easier way.. Enjoy  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|