| View previous topic :: View next topic |
| Author |
Message |
CP1832 Halfop
Joined: 09 Oct 2014 Posts: 68
|
Posted: Wed Nov 19, 2014 11:22 am Post subject: Prevent more than one bind to be triggered |
|
|
Is there any way to process pub binds before pubm binds? Also, is there any way to prevent a pubm to be triggered after a pub trigger has been triggered? For instance, I have a URL title grabber tcl and a message tcl. If I leave a message which includes a URL, I don't want the title grabber to be triggered. For instance:
<dude> !msg walter http://www.somelink.com
<bot> URL title: http://www.somelink.com's title <- IT HAPPENS, BUT IT'S NOT WANTED
<bot> Message for walter accepted
Can this be done? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Nov 19, 2014 3:28 pm Post subject: |
|
|
According to TCL Commands.doc file that comes with the eggdrop, and I quote:
| Quote: |
PUBM binds are processed before PUB binds.
|
This means that you can do what you wanted by changing the url title grabber script to "ignore" (return) when the line that normally would trigger it if the line starts with "!msg" for instance.
Something like:
| Code: |
if {[string first "!msg" [string tolower $line]] != -1} return
|
If you need further assistance post.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
CP1832 Halfop
Joined: 09 Oct 2014 Posts: 68
|
Posted: Thu Nov 20, 2014 11:45 am Post subject: |
|
|
Thanks caesar, I kind of used your code for inspiration to avoid any of my pub binds. | Code: | if {[string index $text 0] eq "!"} { return }
if {[string index $text 0] eq "."} { return } |
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Nov 20, 2014 2:55 pm Post subject: |
|
|
Great, glad you worked it out.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
|