| View previous topic :: View next topic |
| Author |
Message |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Sat Jan 28, 2006 5:49 pm Post subject: Reading the whole sentence, not only one word |
|
|
Hello!
My bot should react when someone in channel write for example: "Bot you are stupid".
| Code: | bind pub - "Bot you are stupid" Stupid
proc Stupid {nick host hand chan rest} {
puthelp "privmsg $chan :Only you."
} |
This one doesn't work. Whats wrong? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 28, 2006 5:53 pm Post subject: |
|
|
bind to pubm, not to pub _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Sat Jan 28, 2006 5:57 pm Post subject: |
|
|
| No, I already tried this, but it is not working. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 28, 2006 6:01 pm Post subject: |
|
|
...because you didn't bother to read the doc about [bind pubm] _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Sat Jan 28, 2006 6:07 pm Post subject: |
|
|
Ok I changed it to this and that is working now.
| Code: | bind pub - "*Bot you are stupid*" Stupid
proc Stupid {nick host hand chan rest} {
puthelp "privmsg $chan :Only you."
} |
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Jan 28, 2006 7:06 pm Post subject: |
|
|
From Tcl-commands.doc:
| Quote: | 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. Also, if a line triggers a PUB bind, it will not
trigger a PUBM bind.
Module: irc |
So you'd understand why it workd. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|