how to edit
bind notc -|- *text* proc
just for private notice.. not for channel notices
Example: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
Code: Select all
bind notc - "*hello my bot*" notc:bot:hello
proc notc:bot:hello {nick host handle text {dest ""}} {
global botnick
if {$dest == ""} {set dest "${botnick}"}
if {[validuser $handle]} {
puthelp "NOTICE $nick :Hello my user! :)"
return
} else {
puthelp "NOTICE $nick :I am not a bot! :("
return
}
}
hope it helpsMatch characters
Many of the bindings allow match characters in the arguments. Here are the four special characters:
? matches any single character
* matches 0 or more characters of any type
% matches 0 or more non-space characters (can be used to match a single word)
~ matches 1 or more space characters (can be used for whitespace between words)
Code: Select all
bind notc -|- *text* yourproc
proc yourproc {nick host hand text {dest ""}} {
if {$dest != "" || ![isbotnick $dest]} {
return 0
}
# Rest of the code here, only evaluated if notice was sent to bot, and not a channel.
}