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.
Help for those learning Tcl or writing their own scripts.
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Sat Jan 28, 2006 5:49 pm
Hello!
My bot should react when someone in channel write for example: "Bot you are stupid".
Code: Select all
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?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sat Jan 28, 2006 5:53 pm
bind to pubm, not to pub
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Sat Jan 28, 2006 5:57 pm
No, I already tried this, but it is not working.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sat Jan 28, 2006 6:01 pm
...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
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Sat Jan 28, 2006 6:07 pm
Ok I changed it to this and that is working now.
Code: Select all
bind pub - "*Bot you are stupid*" Stupid
proc Stupid {nick host hand chan rest} {
puthelp "privmsg $chan :Only you."
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Jan 28, 2006 7:06 pm
From Tcl-commands.doc:
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.