| View previous topic :: View next topic |
| Author |
Message |
flufsor Voice
Joined: 22 Jan 2009 Posts: 4
|
Posted: Thu Jan 22, 2009 8:33 pm Post subject: Bind msg input to be a string? |
|
|
Hi,
I am trying to get my first script ready but i can't,
could use some help its probably very stupid.
| Code: |
set love "Do you love me Faith?"
bind pub - $love pub:love
proc pub:love {nick uhost hand chan args} {
puthelp "PRIVMSG $chan :I love you so hard $nick, you sexy beast !!!"
}
|
I just want the bot to respond on the string Do you love me Faith?
But i have no idea how
help a newby  |
|
| Back to top |
|
 |
Papillon Owner

Joined: 15 Feb 2002 Posts: 724 Location: *.no
|
Posted: Thu Jan 22, 2009 8:59 pm Post subject: |
|
|
we all have to start somewhere
I suggest taking a look at the tcl-commands.doc that comes with your eggdrop.. lot's of nice commands in there, one you might find interesting is | Quote: | (6) PUBM (stackable)
bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: just like MSGM, except it's triggered by things said
on a channel instead of things /msg'd to the bot. The mask is
matched against the channel name followed by the text and can
| contain wildcards. If the proc returns 1, Eggdrop will not log
| the message that triggered this bind. PUBM binds are processed
| before PUB binds. If the exclusive-binds setting is enabled,
| PUB binds will not be trigged by text that a PUBM bind has
| already handled.
Module: irc |
one thing though:
| Code: | | proc pub:love {nick uhost hand chan args} { | args has a special meaning in tcl and I would us something like arg or text until you have properly learned how to handle args.
It will make no difference on your script since you are not using args further anyway, but keep it in mind if you should continue writing scripts _________________ Elen sila lúmenn' omentielvo |
|
| Back to top |
|
 |
flufsor Voice
Joined: 22 Jan 2009 Posts: 4
|
Posted: Thu Jan 22, 2009 10:11 pm Post subject: |
|
|
| Still don't get it, could you post an example maybe ? |
|
| Back to top |
|
 |
Papillon Owner

Joined: 15 Feb 2002 Posts: 724 Location: *.no
|
Posted: Fri Jan 23, 2009 6:51 am Post subject: |
|
|
| Code: | | bind pubm - "* $love" pub:love |
not that different as you see _________________ Elen sila lúmenn' omentielvo |
|
| Back to top |
|
 |
|