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 

Bind pub with more than one word

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


Joined: 09 Sep 2015
Posts: 11

PostPosted: Wed Oct 21, 2015 3:01 pm    Post subject: Bind pub with more than one word Reply with quote

So I may be a newb, ive done research and have tried a few things already to no avail.

I would like to have a 'bind pub' with two words for a trigger, it currently looks like this:

bind pub - "!nfl" get_sched

I would like to have it triggered with:

bind pub - "!nfl thurs" get_sched

thanks!
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Oct 21, 2015 6:14 pm    Post subject: Re: Bind pub with more than one word Reply with quote

silentziler wrote:

...
I would like to have it triggered with:

bind pub - "!nfl thurs" get_sched



Go here:
http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html

and find:
bind pubm

and read about that one.

Experiment with something like:
bind pubm - "!nfl thurs*" get_sched

and see what happens.

I hope this helps.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
silentziler
Voice


Joined: 09 Sep 2015
Posts: 11

PostPosted: Wed Oct 21, 2015 7:39 pm    Post subject: Re: Bind pub with more than one word Reply with quote

Thanks for the suggestion.

So I tried what you recommended and the pubm doesn't seem to work.
I can type anything after !nfl and still trigger the command.

I might have to find a work around.
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Wed Oct 21, 2015 9:59 pm    Post subject: Reply with quote

pubm does work just fine:)

You must restart the bot to remove the previously set binds you had.
Rehashing will not clear them.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Oct 22, 2015 6:34 am    Post subject: Reply with quote

SpiKe^^ wrote:

...
You must restart the bot to remove the previously set binds you had.
Rehashing will not clear them.



silenziler:
I forgot to mention this. Sorry.
Spike^^ intuitively realized the problem.

Spike^^: Thanks for jumping in, so silentziler didn't have to wait for me to re-appear here.

silentziler: In the partyline, learn to use the
.binds
command. It will list current binds. You can search with it also.
Using this exercise as an example, do:
.binds *nfl*
and all binds with "nfl" in them will be listed. If I had remembered to advise you to do this, and if you had simply rehashed, you would have created a new bind, and both it and the original bind would be listed - which is exactly what Spike^^ mentioned. Smile

After you .restart, take a moment and do .binds *nfl* , just to confirm that you have only one bind related to your current experiment.

Note: When listing binds, the report includes a Hit counter. Keep it in mind, as sometimes that too can be very useful info when figuring out where things are not going as expected.

Let us know how it goes.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
silentziler
Voice


Joined: 09 Sep 2015
Posts: 11

PostPosted: Thu Oct 22, 2015 11:37 am    Post subject: Fixed! Reply with quote

Quote:

silenziler:
I forgot to mention this. Sorry.
Spike^^ intuitively realized the problem.

Spike^^: Thanks for jumping in, so silentziler didn't have to wait for me to re-appear here.

silentziler: In the partyline, learn to use the
.binds
command. It will list current binds. You can search with it also.
Using this exercise as an example, do:
.binds *nfl*
and all binds with "nfl" in them will be listed. If I had remembered to advise you to do this, and if you had simply rehashed, you would have created a new bind, and both it and the original bind would be listed - which is exactly what Spike^^ mentioned. Smile

After you .restart, take a moment and do .binds *nfl* , just to confirm that you have only one bind related to your current experiment.

Note: When listing binds, the report includes a Hit counter. Keep it in mind, as sometimes that too can be very useful info when figuring out where things are not going as expected.

Let us know how it goes.


Okay that did the trick!
It worked after I added the channel and restarted lol

Thanks guys!
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