on *:text:*:#: {
if ($nick isop #botops ) { return }
IF ($nick isop # ) { RETURN }
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 = bitch,asshole,fotze,ficken,biatch,suck dick,bumsen,schlampe,horny,fickgeil,penis,vagina,sieg heil,Schlampe,dickhead,dickface,pussy,whore,cunt,fuck you,shitface,fucker,faggot
var %a = $numtok(%badword,44)
while (%a) {
var %bchk = $gettok(%badword,%a,44)
if (%bchk isin $1-) {
inc -eu30 $+(%,badword,.,$chan)
var %times = $($+(%,badword,.,$chan),2)
if (%times < 5) {
if (*german* !iswm $chan) {
notice $nick 12 $+ $nick $+ 7, 4Your behavior is inappropriate. Please change your way of chatting.
aline -a @Botlog $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Warned for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Warned for Behaviour ( $+ $1- $+ )
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
}
if (*german* iswm $chan) {
msg $chan 12 $+ $nick $+ 7, 4Dein Verhalten ist unangebracht, bitte aendere deine Art zu chatten.
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
aline -a @Botlog $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Warned for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Warned for Behaviour ( $+ $1- $+ )
}
}
elseif (%times == 5) {
if (*german* !iswm $chan) {
kick $chan $nick Please change your way of chatting.
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
aline -a @Botlog $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Kicked for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Kicked for Behaviour ( $+ $1- $+ )
}
if (*german* iswm $chan) {
kick $chan $nick Dein Verhalten ist unangebracht, bitte aendere deine Art zu chatten.
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
aline -a @Botlog $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Kicked for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Kicked for Behaviour ( $+ $1- $+ )
}
}
elseif (%times > 5) {
if (*german* !iswm $chan) {
aline -a @Botlog $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Banned for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - Banned for Behaviour ( $+ $1- $+ )
ban -ku3600 $chan $nick Banned: Please change your way of chatting.
unset $+(%,badword,.,$chan)
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
}
if (*german* iswm $chan) {
aline -a @Botlog $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Banned for Behaviour ( $+ $1- $+ )
write Botlog.txt $timestamp [Bad-Behaviour-GER] $network - $chan - $nick - $fulladdress - Banned for Behaviour ( $+ $1- $+ )
ban -ku3600 $chan $nick Gebannt: Dein Verhalten ist unangebracht, bitte aendere deine Art zu chatten.
unset $+(%,badword,.,$chan)
echo $chan 4 $timestamp [Bad-Behaviour] $network - $chan - $nick - $fulladdress - ( $+ $1- $+ )
}
}
}
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)
}