## set a var for your hosts
set matchHosts [list \
*@crew* \
*@root* \
*@bastard* \
*@services* \
*@*users*]
## then use that down here
proc join:message {nick uhost hand chan} {
foreach mask $::matchHosts {
if {![string match -nocase $mask $uhost]} {utimer 15 [list timed_message $nick]; return 0}
}
}
## put your binds after the proc
bind join - * join:message
proc timed_message {nick} {
puthelp "NOTICE $nick :Hi $nick, welcome to #channel... blabla :D"
}
THe problem is: with this current code, the bot sends the delayed notice to ALL users joining that channel ALSO these one having this (v)host is specified above :/
Any ideas it might be inside the foreach - if thingy... but I'm out of my sources. Im not that tcl-freak and snipped the code together
Thanks for your help.
I use eggdrop *.18 under suse10 on an unrealircd
## set a var for your hosts
set matchHosts [list \
*@crew* \
*@root* \
*@bastard* \
*@services* \
*@*users*]
## then use that down here
proc join:message {nick uhost hand chan} {
foreach mask $::matchHosts {
if {[string match -nocase $mask $uhost]} {return 0}
}
utimer 15 [list timed_message $nick]
}
## put your binds after the proc
bind join - * join:message
proc timed_message {nick} {
puthelp "NOTICE $nick :Hi $nick, welcome to #channel... blabla :D"
}