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 

Prevent more than one bind to be triggered

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


Joined: 09 Oct 2014
Posts: 68

PostPosted: Wed Nov 19, 2014 11:22 am    Post subject: Prevent more than one bind to be triggered Reply with quote

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
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed Nov 19, 2014 3:28 pm    Post subject: Reply with quote

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. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
CP1832
Halfop


Joined: 09 Oct 2014
Posts: 68

PostPosted: Thu Nov 20, 2014 11:45 am    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Nov 20, 2014 2:55 pm    Post subject: Reply with quote

Great, glad you worked it out. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
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