This is a simple badword script. I aint using a fancy dialog, as this was mainly meant for a little experienced users along with a bot, remotly.
Anyhow, there's a menu if you wish to use it local.
Type !badword [on|off] to turn it on/off.
It will warn the user 1 times, kick on second and ban on third.
Please read through the script and read commented information, change the badwords and channels below the commented text.
Just paste in remotes (alt + r) and youre ready to do...
PS: The code might not be the best nor prettiest, i made it cause i was bored, and were going to show a friend how to do it :p.
Enjoy!
on *:text:*:#: {
if ($1 == !badword) && ($_chan($chan)) && ($istok(on off,$2,32)) && ($nick isop $chan) {
set %_badword $iif($2 == off,$v2,on)
msg $chan Badword protection is now %_badword
}
else {
if (%_badword == on) && ($me isop $chan) && ($nick !isop $chan) && ($_chan($chan)) {
; Change the badwords below to fit your own needs.
var %badword = shit,gay,homo,pussy, %a = $numtok(%badword,44)
while (%a) {
var %bchk = $gettok(%badword,%a,44)
if (%bchk isin $1-) {
inc $+(%,badword,.,$nick,.,$chan)
var %times = $($+(%,badword,.,$nick,.,$chan),2)
if (%times == 1) {
.notice $nick Please dont use badwords in $chan $nick $+ . You've broken the rules %times time. (You said badword: %bchk $+ )
}
elseif (%times == 2) {
kick $chan $nick Please dont use badwords in $chan $nick $+ . You've broken the rules %times times. Next time you'll be banned! (You said badword: %bchk $+ )
}
elseif (%times > 2) {
ban -ku900 $chan $nick 2 I warned you 2 times already. Bye bye. 15 minutes ban.
unset $+(%,badword,.,$nick,.,$chan)
}
}
dec %a
}
}
}
}
alias -l _chan {
; Change the channels for the bot to work on below, to make it work in all channels just input "#".
var %a = #, %b = $numtok(%a,44)
while (%b) {
if ($1 == $gettok(%a,%b,44)) || (%a == $chr(35)) {
return $true
}
dec %b
}
}
on *:exit: {
unset %badword.*
}
menu channel {
.Turn badword filter $iif(%_badword == on,off,on) : set %_badword $iif(%_badword == on,off,on)
}
Example from old Mirc Script, modify whatever you want because some words are for spanish language:
on @!*:text:*:#:if (%Badword. [ $+ [ # ] ] = si) { Badwordkick $strip($1-) }
on @!*:action:*:#:if (%Badword. [ $+ [ # ] ] = si) { Badwordkick $strip($1-) }
alias -l Badwordkick {
var %b = $strip($1-)
if ($nick(#, $nick, '.@)) halt
if ($regex(%b,/(b!tchs?|chtm|choch[ao]s?|ogetes?))/i) badkick
elseif ($regex(%b,/(fuks?|fucks?|put[ao]s?|cabron.?s?))/i) badkick
elseif ($regex(%b,/(me las pelas?|pendej[ao]s?))/i) badkick
elseif ($regex(%b,/(mamadas?|lammers?|suckers?))/i) badkick
elseif ($regex(%b,/(pito|vergas?|culos?))/i) badkick
elseif ($regex(%b,/(chinga|suks?|culer[ao]s?|ogt))/i) badkick
elseif ($regex(%b,/(dicks?|bitchs?|whores?|sluts?))/i) badkick
elseif ($regex(%b,/(ass holes?|assholes?|pingas?))/i) badkick
elseif ($regex(%b,/(soy (Dios|.. Dios)))/i) bigkick
elseif ($regex(%b,/(I'?a?m (God|..?.? God)))/i) bigkick
halt
}
Menu Channel {
-
Protection
.$Iif(%Badword. [ $+ [ # ] ] == si, $Style(1)) Badword Protection: {
Set %Badword. [ $+ [ # ] ] $Iif(%Badword. [ $+ [ # ] ] == si, no, si)
Echo -at * 0Badwords Protection $Iif(%Badword. [ $+ [ # ] ] == si, Activated, Desactivated)
}
}
-
Badkick and Bigkick are aliases post whatever you want there.