Code:
on *:text:*:#: {
if ($ulevel >= 99) {
if ($strip($1) == !filter) {
if ($strip($2) == on) {
if (%filter == on) { msg $chan Filter Is Already On }
elseif (%filter == off) { set %filter on | msg $chan Filter Is Now %filter }
elseif (!%filter) { set %filter on | msg $chan FIlter is Now %filter }
}
elseif ($strip($2) == off) {
if (%filter == off) { msg $chan Filter Is Already Off }
elseif (%filter == on) { set %filter off | msg $chan Filter Is Now %filter }
elseif (!%filter) { set %filter off | msg $chan Filter Is Now %filter }
}
}
if ($strip($1) == !filteradd) {
var %p = 1
while (%p <= $lines(badwords.txt)) {
if ($gettok($read(badwords.txt, %p),1,126) == $gettok($strip($2-),1,126)) {
set %rmatch 1
msg $chan $gettok($strip($2-),1,126) Is Already In Filter List
}
if (%p == $lines(badwords.txt)) {
if (!%rmatch) { write badwords.txt $strip($2-) }
}
inc %p
}
}
if ($strip($1) == !filterrem) { 
var %o = 1
while (%o <= $lines(badwords.txt)) {
if ($gettok($read(badwords.txt, %o),1,126) == $strip($2-)) {
write $+(-dl,%o) badwords.txt
}
inc %o
}
}
}
if (%filter) {
    var %x = 1
    while (%x <= $numtok($strip($1-),32)) {
      var %b = 1
      var %y = $gettok($strip($1-),%x,32)
      while (%b <= $lines(badwords.txt)) {
        var %c = $gettok($read(badwords.txt, %b),1,126)
        if (%y == %c) || ($gettok($strip($1-),$+(%x,-,$numtok($gettok($read(badwords.txt, %b),1,126),32)),32) == $gettok($read(badwords.txt, %b),1,126)) {
;;;;THIS PART;;;;;
          mode $chan +b $address($nick,2) | kick $chan $nick BadWord Detected: $gettok($read(badwords.txt, %b),2,126) 
        }
        inc %b
      }
      inc %x
    }
  }
}


Hi There smile I Have A Very Simular Script In My Bot So I Added Your Version Of On/Off Toggle And Add and remove commands.
I Didn't Understand If You Wanted The Script To KickBan The User So You Can Change The KickBan Part. I Have Marked The Part With ;;;THIS PART;;; In Case You Couldn't Find It In The Code.
This Script Saves The Bad Words Or Expressions You Want And If It Finds A Match It KickBans The User. As I Said You Can Change That Part
So To Add A Word Or Expression You Have To Have user level 99 on users list of mIRC and you have to type !filteradd word~kickreason (e.g !filteradd you are a banana~im not a banana Mr. ) (or e.g !filteradd banana~no bananas allowed)
And To Delete A Word Or Expression You Should Just Type !filterrem word/expressionm (e.g !filterrem banana) (or e.g !filterrem you are a banana)
P.S-1 I Haven't tested it but i copied most of the code from my bot so it works 100% :P
P.S-2 (by expression i mean the sctipt can see for example this: you are a banana . and ban it. Not only one word.)
I Hope You Like It! If You Want Me To Change Anything Tell Me!

-OrFeAsGr-

Last edited by OrFeAsGr; 02/02/15 12:25 AM.