| View previous topic :: View next topic |
| Author |
Message |
crux Voice

Joined: 05 Jan 2007 Posts: 35 Location: Myanmar
|
Posted: Thu Feb 15, 2007 11:59 am Post subject: pubm |
|
|
this code doesn't work......
I think it's incorrect binding pubm
somethings need to do ...
pls help me to correct..
| Code: | bind pubm -|- "hello there" hello
proc hello {nickname hostname handle channel} {
if {[string equal $channel #mychan]} {
putquick "PRIVMSG $channel :Hello welcome to #mychan"
}
} |
_________________ Myanmar Chat Online
MCO Chat |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Feb 15, 2007 2:07 pm Post subject: |
|
|
| 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
|
Obviously, you're missing a variable to handle the <text> argument. Modify your proc-head accordingly.
Also, as stated above, the mask is matched against "<channel> <text>", so your binding will never trigger. Something like "% sometext" would match "sometext" on any channel _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Feb 16, 2007 12:12 am Post subject: Re: pubm |
|
|
| Code: |
bind pubm -|- "% hello there" hello
proc hello {nickname hostname handle channel text} {
if {$channel == "#mychan"} {
putquick "PRIVMSG #mychan :Hello welcome to #mychan"
}
# set this to 'return 1' if you don't want the trigger being logged
return 0
} |
Should work.. |
|
| Back to top |
|
 |
|