Hello everyone, I got my Badword script from somewhere and used to re-code it a bit ages ago; it's still working and I', happy how it's running. Well, now I got the Problem when there are 50 Floodbots in the Room, Spamming/Flooding badwords the Bot tries to ban them all, also it tries to warn and kick them, which causes an excess flood for the bot.

So, my question, can somebody add a block/tell me how that it automaticly detects like.. after 5 Warns in 30 seconds that it won't warn anymore? - Just bans?

Here is the code

Code:
#Badwords
#normal
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, %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) {
            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 == 2) {
            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 > 2) {
            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 -u3600 $chan $address($nick,2)
              kick $chan $nick Banned: Please change your way of chatting.
              unset $+(%,badword,.,$nick,.,$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 -u3600 $chan $address($nick,2)
              kick $chan $nick Gebannt: Dein Verhalten ist unangebracht, bitte aendere deine Art zu chatten.
              unset $+(%,badword,.,$nick,.,$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)
}


Thank you, it's really important.


Chris 'DarkTexas' D.
Technical Administrator
ICQ-Chat IRC Services
http://icq-chat.com