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 

Reading the whole sentence, not only one word

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


Joined: 21 Jan 2006
Posts: 155

PostPosted: Sat Jan 28, 2006 5:49 pm    Post subject: Reading the whole sentence, not only one word Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jan 28, 2006 5:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Sat Jan 28, 2006 5:57 pm    Post subject: Reply with quote

No, I already tried this, but it is not working.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jan 28, 2006 6:01 pm    Post subject: Reply with quote

...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
View user's profile Send private message Visit poster's website
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Sat Jan 28, 2006 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jan 28, 2006 7:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
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