egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

2 TCL Files. 1 Trigger.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
squeege
Voice


Joined: 13 Jan 2012
Posts: 10

PostPosted: Wed Jan 25, 2012 5:50 pm    Post subject: 2 TCL Files. 1 Trigger. Reply with quote

Hi,

I am running eggdrop1.8 as i need ssl Smile
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 Sad Anyway to fix this?

Thanks,

Louis
Back to top
View user's profile Send private message
stormshadow
Voice


Joined: 11 Mar 2011
Posts: 7

PostPosted: Fri Jan 27, 2012 1:05 am    Post subject: details Reply with quote

What do you mean by "trigger two scripts?"
Are you referring to procs?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Jan 27, 2012 1:45 pm    Post subject: Re: 2 TCL Files. 1 Trigger. Reply with quote

squeege wrote:
Hi,

I am running eggdrop1.8 as i need ssl Smile
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 Sad 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 Wink
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber