mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2015
Posts: 15
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Feb 2015
Posts: 15
Quote:
on $*:text:/(bad word|word bad)/Si:#:{
msg # /timeout $nick 600


So let's say "bad word" is banned in a channel, and "word bad" is banned. On their own "bad" and "word" they are fine until combined in a message. If someone were to say "Banned is the word" how would I have that also be timed for containing both of the words?

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
I read in a list of bad words from a text file. In the txt file i put on a new line: "*bad word*" and "*word bad*"

That's how i handle it. For just those two words, add the wild cards and it should work just fine.


twitter @keyeslol
Joined: Feb 2015
Posts: 15
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Feb 2015
Posts: 15
Meant to say "bad is the word" or "the word is bad"

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Just so i understand, you want to timeout "bad*word" and "word*bad" but not either of them by themselves?

If i understood correctly, you can put them in just like that in a file or in your on text event or do regex pattern matching.


twitter @keyeslol
Joined: Feb 2015
Posts: 15
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Feb 2015
Posts: 15
Correct, so the message is only timed out if it contains both words.

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
So yes, to accomplish this you could easily do:

Code:
on *:text:bad*word:#: {
  do something
}


and

Code:
on *text:word*bad:#: {
  do something
}


However this isn't really scalable. Back to my original comment, i would make a text file to read in bad words, then you can easily put them in this file in the future. Either manually or add a command to do it through chat.


twitter @keyeslol

Link Copied to Clipboard