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 

pubm

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


Joined: 05 Jan 2007
Posts: 35
Location: Myanmar

PostPosted: Thu Feb 15, 2007 11:59 am    Post subject: pubm Reply with quote

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


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Feb 15, 2007 2:07 pm    Post subject: Reply with quote

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


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Feb 16, 2007 12:12 am    Post subject: Re: pubm Reply with quote

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