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 

Bind Server Notices

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


Joined: 18 Jan 2009
Posts: 80

PostPosted: Mon May 04, 2009 1:49 pm    Post subject: Bind Server Notices Reply with quote

Hi scripters,

I wonder how can I bind snotices? I read tcl-commands.doc and it seems like bind NOTC will not be triggered by servernotices. I have to make a script that is activaterd by a server notice. How can I bind it?

Thanks in advance,
Fill
Back to top
View user's profile Send private message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Tue May 05, 2009 1:29 pm    Post subject: Reply with quote

Code:

bind notc - * myproc

proc myproc {nick host handle text} {
   putlog "$nick noticed me! (Text: $text)
}

Back to top
View user's profile Send private message
Fill
Halfop


Joined: 18 Jan 2009
Posts: 80

PostPosted: Tue May 05, 2009 4:51 pm    Post subject: Reply with quote

Hi,

Sorry to tell you, but that's wrong. According to tcl-commands.doc, bind NOTC command will not be triggered by server notices:

Code:

    (7)  NOTC (stackable)
         bind notc <flags> <mask> <proc>
         procname <nick> <user@host> <handle> <text> <dest>

         Description: dest will be a nickname (the bot's nickname,
           obviously) or a channel name. mask is matched against the entire
           notice and can contain wildcards. It is considered a breach of
           protocol to respond to a /notice on IRC, so this is intended for
           internal use (logging, etc.) only. Note that server notices do
|          not trigger the NOTC bind. If the proc returns 1, Eggdrop will
|          not log the message that triggered this bind.

           New Tcl procs should be declared as
             proc notcproc {nick uhost hand text {dest ""}} {
               global botnick; if {$dest == ""} {set dest $botnick}
               ...
             }
           for compatibility.
         Module: server


Anyway, I discovered how I can do it. bind raw will solve it.

Something like:

Code:

bind raw - "NOTICE" proc


See ya, and thanks for the help anyway
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