This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

obtaining text from a line of chat

Old posts that have not been replied to for several years.
Locked
t
tami
Voice
Posts: 13
Joined: Tue Feb 05, 2002 8:00 pm

Post by tami »

i currently have this code in a script that i own:

bind pub - bye pub_bye

which calls the pub_bye procedure when i type the word "bye" as the FIRST word on a line.

i was wondering how to further enhance this "bye" code segment to call pub_bye if the i type something like "where are you going, bye now" so that "bye" is no longer the first word.

how would i do such a thing? i've already attempted "bye" and "*bye*" to no avail. maybe i need something else?

thanks!
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

If u check the tcl-commands.doc file that ships with eggdrops u will notice the following:
PUB is used for commands given on a channel ... the first word becomes the command and everything else is the argument string.
However a little bit further down in this same file u will find.
PUBM (stackable)
bind pubm <flags> <mask> <proc>
the mask is matched against the channel name followed by the text.
Example: "#nowhere hello there!", and can contain wildcards.
So if I am not mistaken, you can use "PUBM"
Hope this helps :smile:

<font size=-1>[ This Message was edited by: z_one on 2002-02-06 06:28 ]</font>
Locked