set welc(msg1) "Message in 1st line"
set welc(msg2) "Message in 2nd line"
set welc(chan) "#MyChannel"
set welc(type) "1"
bind join - #MyChannel* givewelcome
proc givewelcome {nick uhost hand chan} {
global welc
set welctxt1 $welc(msg1)
set welctxt2 $welc(msg2)
regsub -all "%nick" $welctxt1 "$nick" welctxt1
regsub -all "%nick" $welctxt2 "$nick" welctxt2
regsub -all "%chan" $welctxt1 "$chan" welctxt1
regsub -all "%chan" $welctxt2 "$chan" welctxt2
switch $welc(type) {
1 {
puthelp "NOTICE $nick :$welctxt1"
puthelp "NOTICE $nick :$welctxt2"
}
2 {
puthelp "PRIVMSG $nick :$welctxt1"
puthelp "PRIVMSG $nick :$welctxt2"
}
}
}
putlog "Channel Greeting - Generated by http://www.egginfo.org - Frostbyte"
Hi!
I do have a simple channel notice generated as above.
but the problem is, if there is a mass clones (which will then been kicked and banned from channel), the bot still sending notice to them eventhough they have been kicked out from channel
How to modify the script so the bot won't send notices to those who have been kicked out of channel
I found that my bot will Excess Flood by sending notices non-stop to them...
thanks in advanced
Last edited by panasonic on Mon Nov 12, 2007 4:51 pm, edited 2 times in total.
One iea might be to use timers (utimer) to delay the message a few seconds, and do a simple check wether the target is still inside the channel (onchan).
ok, there is slight modification to utimer and the timers is now working
but i still have problem with onchan (to make sure that the bot didnt send the notice/messages to any kick/banned user)
thanks a lot, Tosser^^
the bot is now able to perform delay time before sending msg to user and no longer sending msg to a kicked/banned user
since the code has changed, i have to learn it and try to understand it again