| View previous topic :: View next topic |
| Author |
Message |
fluokabouter Voice
Joined: 29 Jan 2007 Posts: 2
|
Posted: Mon Jan 29, 2007 5:45 am Post subject: Trigger help |
|
|
Hello,
I don't know how to search for this on the forum It's complicated to explain
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Jan 29, 2007 3:07 pm Post subject: |
|
|
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 |
|
 |
fluokabouter Voice
Joined: 29 Jan 2007 Posts: 2
|
Posted: Tue Jan 30, 2007 2:42 pm Post subject: |
|
|
Thank you,
but it doesn't work properly
Trying to fix it |
|
| Back to top |
|
 |
|