Top

Badword Filter


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  2.0 (of 1 scores)
Date Added  Aug 06, 2008
Last Updated  Aug 06, 2008
Tags  badword  channel  filter  jamiie  mirc  protection 

Description

This is from boredom one day, thanks to Typo for helping with majority of it!


Triggers:
/badon (turns badword filter on.)
/badoff (turns badword filter off.)
/addw (adds badword to list)
/badwchan (adds a channel to the badword protection list)

Grab the Code

on *:text:*:#: {
  if ($chan == $eval($+(%,badwchan,.,$chan),2)) {
    if (%badw == on) {
      var %nbw $lines(badw.txt)
      while (%nbw) {
        if ($read(badw.txt, %nbw) isin $1-) {
          inc $+(%,badwnick,.,$nick) 1
          if ($($+(%,badwnick,.,$nick),2) == 1) { .notice $nick First warning, do not say that badword again. }
          if ($($+(%,badwnick,.,$nick),2) == 2) {
            cs kick $chan $nick
            .notice $nick Warned you the first time, this is your last. Next time will be a kickban/akick.
        }
          if ($($+(%,badwnick,.,$nick),2) >= 3) {
            ban -k $chan $nick
            .notice $nick That was your last warning.
        }
      }
        dec %nbw
      }
    }
  }
}
alias badon {
  if (%badw == on) {
    echo -a Badword filter is already on!
  }
  else {
    set %badw on
    echo -a Badword filter is now on!
  }
}
alias badoff {
  if (%badw == off) {
    echo -a Badword filter is already off!
  }
  else {
    set %badw off
    echo -a Badword filter is now off!
  }
}
alias addw {
  if ($1 == $read(badw.txt,w,$1)) {
    echo -a That word is already on the badword list!
  }
  else {
    write badw.txt $1
    echo -a Badword has been added to the badword list!
  }
}
alias remban {
  unset $+(%,badwnick,.,$1)
 
}
alias badwchan {
  if ($1 == $read(badwchan.txt,w,$1)) {
    echo -a That channel is already on the list!
  }
  else { 
    set $+(%,badwchan,.,$1)
    write badwchan.txt $1
    echo -a  Channel: $1 is now on channel protection list!
  }
}
 

Comments

  (2)  RSS
napa182
Comments: 1,686
 
mIRC Snippet:  Badword Filter
Posted on Aug 6, 2008 1:17 am
on ur ban line how about setting a banmask to it cuz they can just change nicks so maybe
for ircd
Code:
ban -k $chan $nick 2

for Chatspace
Code:
ban -k $chan $nick 4

i dont see why you add a var for the channel and then write it to a txt file.. just add the channel to a var then use tokens to check the channel maybe like this

Code:
alias badwchan {
  if (!$istok(%badwchan,$1,44)) {
    echo -a Channel: $1 is now on channel protection list!
    set %badwchan $addtok(%badwchan,$1,44)
  }
  else { echo -a That channel is already on the list! }
}


and then use this line to check for the channel on ur on text

Code:
if ($istok(%badwchan,$chan,44) && %badw == on) {


another thing is that it warns/kick/ban's for wildcard matches like say i add hell for a bad word it triggered on hello =/
Quote:
[12:20 am] <napa182> hello
[12:20 am] -sick0- First warning, do not say that badword again.
[12:20 am] <napa182> hello
[12:20 am] -sick0- Warned you the first time, this is your last. Next time will be a kickban/akick.

=/
AHBARAR
Comments: 167
 
mIRC Snippet:  Badword Filter
Posted on Aug 7, 2008 8:55 am
i think it work on hell* if u add hell as swear word check that to be sure and would this work on multi words as fu ck .. etc

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom