This is an op script to auto-kick/ban if someone uses forbidden words in a channel or private message. The word list is regex and editable through a simple input dialog box. An on load event will set the initial list of words to global variable %bwkb and by using command /bwkb you may access the forbidden word list editor. Includes auto-ignore for same length of time.
on @*:TEXT:*:#:bwkb 0 $1-
on @*:ACTION:*:#:bwkb 0 $1-
on @*:NOTICE:*:#:bwkb 0 $1-
on ^*:OPEN:?:bwkb 1 $1-
on *:TEXT:*:?:bwkb 1 $1-
on *:ACTION:*:?:bwkb 1 $1-
on *:NOTICE:*:?:bwkb 1 $1-
alias bwkb {
if $regex($2-,%bwkb) {
var %c,%i 1
while $comchan($nick,%i) {
%c = $v1
if $nick(%c,$me,~&@%) {
ban -ku600 %c $nick 2 Ten minute ban for foul $+(language,$iif($1,$chr(32) in private message),!)
}
inc %i
}
.ignore -pntidu600 $nick 2
}
elseif ($1 = $null) $iif($input(/word1|\bword2\b|wo?rd3/iS,e,RegEx for BadWord Kick/Ban,%bwkb),set %bwkb $!)
}
on 1:load:{ set %bwkb /bitch|bastard|cunt|cock|fuc?k|h[o0]rn(ie|y)| $&
$+ nigger|\btwat\b|whore|penis|shit|\bcibai\b|dick|pussy|slut/iS }
gooshie, you are welcome an yes I still linger around this site. lol...
Yes please post that way we can get Hawkee.com out of its pastebin funk that it has sank into once again.
It seems like every so often people use it like a pastebin/trashcan an post snippets that are just not worth sharing.
So its nice to come on the site an see snippets that are worth clicking on to read, test, an whatnot.
Again nice work.
Master-Of-Death
Thanks, but I was just putting the few in the on load event to give it a start.. I put the few diff types of matches with like \b(o|0)\b? to sorta give examples for those usefull flags it includes a simple little $input editor to modify the regex string the way you want by using the command /bwkb
@Gooshie
I thought that may be useful as it covers a few more insults. It may be altered by the built in filter system that hawkee uses to remove swear words, if so i'll pm it to you if that is ok?
Don't be harsh it is my first attempt at regular expressions, lol I did it after a five minute crash course tutorial, so I hope it meets yours and Jethro_'s standards and helps.
on 1:load:{ set %bwkb /bia?tch|bastard|c(un)t|((m(0|o)th(e|3)r)?co|di|fu)ck(er)?|h.rn(ie|i3|y)|nigg(e|3)r|\btw(a|i)t\b|wh(0|o)r(e|3)|p(e|3)nis|(sh|g|cl)it|pussy|sl(ut|ag)/iS }
EDITED TO INCLUDE ALL SWEAR WORDS HENCE:
|c(un)t|
NOT A TYPO.
Yup Jethro_ I got tired of trying to get them to post their alternative vaporware solution and just brought mine over here and posted it.. Like I could have done written what they were suggesting/hinting at and been done but I think I was being a real sport to post as much of a solution that I did.. for all their babbling about what they suggest they could have either created their solution or at the very least made a list of all the words that we really need to check for so we don't even need some elaborate editor to add/change the forbidden word list... I sorta like using a set variable for this since I so seldomly use global variables that I only have about 3-4 of them being used.. like this is one of the few times I was gonna be ok with using a global variable and along comes someone wanting to use hash lol..