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 

Trigger help

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


Joined: 29 Jan 2007
Posts: 2

PostPosted: Mon Jan 29, 2007 5:45 am    Post subject: Trigger help Reply with quote

Hello,

I don't know how to search for this on the forum It's complicated to explain Wink

I would like to bind a new trigger for example !define
to forward this to !google define:

I know, it's incith's script. But he checks if define is set in his code,
its not just another proc to call..

bind - !define <other trigger> won't work I guess?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Jan 29, 2007 3:07 pm    Post subject: Reply with quote

Not quite... What you could do I guess, is write a tiny proc that "fakes" a triggered binding.
I guess it would be something like this:
Code:
bind pub -|- !define [list mydefine ::incith::google::public_message]
bind msg -|- !define [list mydefine ::incith::google::private_message
proc mydefine {type args} {
 set cmd [split [lindex $args end]]
 set cmd [join [lreplace $cmd 0 0 "!google define"]]
 eval "$type [lreplace $args end end $cmd]"
}

I hav'nt verified the code however, so I can't promise that it will work flawlessly (or at all).
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
fluokabouter
Voice


Joined: 29 Jan 2007
Posts: 2

PostPosted: Tue Jan 30, 2007 2:42 pm    Post subject: Reply with quote

Thank you,
but it doesn't work properly Wink

Trying to fix it
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