Skip to content
MSN

file scan

A TG007 community discussion started by DreaM.

Discussion 9 posts
Page 1 of 1
Open
Topic #2261 · 9 published posts · 737 views

hi guys, I have a text file contains many of bad words and I want my script to kick any chatter types any bad word in the room.

 

bad words in the text file:

blah

blah1

blah2

.

.

 

I want when someone types ......blah....., my script kicks him out so what is the code please?

To me, the easiest way that seems to work the best is this way...

 

on *:TEXT:*:#:{
 if (blah isin $1-) || (blah1 isin $1-) || (blah2 isin $1-) || (blah3 isin $1-) || blah4 isin $1-) { 
   kick $comchan($nick,1) $nick [ No Profanity Allowed ] }
}

 

 

but there are many blahs warrior

sure I need text file because the list of words is big

http://www.tg007.net/downloadsmsn/pafiledb...e&id=3&file=781

 

that's a profanity system, load that and change the name of your text file with all the bad words in to profanity.ini and it will kick anyone who says the words in that file

"the important thing was, that i had an onion on my belt, which was the style at the time"

but there are many blahs warrior

sure I need text file because the list of words is big

Yes, there are many blahs, lol. However, it will kick if any one of those words are said. You can add as many words to kick for as you want, and it will work.

yes but i have seen it before and I know that it is can be done.

That is why am asking you guys

in the case that you want, you need to put $chr(32) on right side of the first blah, or make a filter that wont respond to the word if it an extention is on the word.

on *:text:*:#:{
 var %a = 1
 while ($lines(words.txt) >= %a) {
   if ($read(words.txt,%a) isin $1-) { kick $chan $nick Bad word | break }
   inc %a
 }
}

There's a good chance that may lag you (or flood you out) though. The only other way to do it using a text file is to rewrite the snippet whenever you change the file. Either that and string them all in a line and use tokens.

Edited Dec 18, 2004 9:54 AM by Cleric xtx

 

thank you all and specially cleric and it did not lag me because the file has only 35 words