Hi there,
i've been able to get the following script working for identifying badword. The only thing i can't seem to get working is how to have this badword check been excluded from other channels. For instance this script should run in Cybercafe and 30+ but not in Sexroom:
What i also would like to do is be able to have the badword in a string so that when the bot reply's: That's quite a naughty word, it also mentions the badword so the sentence would be like: $badword , that's quite a naughty word. I know $n is showing me the badword but it still shows the * that are around the badword.
Who can help me... My script is a s follows:
set badword {
lul
"lul *"
"* lul"
"* lul *"
}
bind pubm - * checkword
proc checkword {nick uhost handle chan text} {
global badword
if (![matchattr $nick +o]) {
foreach n $badword {
if ([string match $n [string tolower $text]]) {
putlog "$nick said bad word in $chan - $n"
putserv "PRIVMSG $chan :\001ACTION says: That's quite a naughty word \001"
return 0
}
}
}
}