Page 1 of 1

Caps block

Posted: Fri Aug 26, 2005 12:43 pm
by Guest
I've treid to block users from sending msg's with caps this way

spamfilter {
regex "[A-Z]{20}";
target { channel; };
action block;
reason "Drop Your Caps!";
};

but it blocks also words with letters more than 20 and normal msg's

How can i block Caps letters only? Thx :)

Re: Caps block

Posted: Fri Aug 26, 2005 3:33 pm
by Syzop
You can use (?-i) to make it case sensitive:

Code: Select all

regex "(?-i)[A-Z]{20}";
but probably something like this would be better (include space):

Code: Select all

regex "(?-i)[A-Z ]{20}";
Or even include digits and other stuff... (punctuation) ?

Perhaps someone else has some great suggestions :p

Caps Block

Posted: Sat Aug 27, 2005 4:58 pm
by Guest
Syzop

There is no need for any new suggestions. The code is working fine...
Thx alote