| View previous topic :: View next topic |
| Author |
Message |
Fill Halfop
Joined: 18 Jan 2009 Posts: 80
|
Posted: Mon May 04, 2009 1:49 pm Post subject: Bind Server Notices |
|
|
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 |
|
 |
garfwen Halfop
Joined: 12 Mar 2008 Posts: 61
|
Posted: Tue May 05, 2009 1:29 pm Post subject: |
|
|
| Code: |
bind notc - * myproc
proc myproc {nick host handle text} {
putlog "$nick noticed me! (Text: $text)
}
|
|
|
| Back to top |
|
 |
Fill Halfop
Joined: 18 Jan 2009 Posts: 80
|
Posted: Tue May 05, 2009 4:51 pm Post subject: |
|
|
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 |
|
 |
|