spamfilter in unreal 3.2.3

These are old archives. They are kept for historic purposes only.
Post Reply
finkoisti
Posts: 5
Joined: Fri Apr 01, 2005 6:01 pm

spamfilter in unreal 3.2.3

Post by finkoisti »

Need help with that, want to ban user with nick or realname if it included 3 or more numbers..but how to do that?
Now it seems that the spamfilter doesn't work at all...

spamfilter {
regex "^[0-9]{3,}!~[0-9]{3,}@.+:[0-9]{3,}$";
target { user; };
reason "Loser";
action block;
};

thats the one way I have try it...dosn't work, so how to do it??
finkoisti
Posts: 5
Joined: Fri Apr 01, 2005 6:01 pm

Post by finkoisti »

Now I have try many other ways also, but can't get it work..
if I use ex. regex "a[0-9]{3,7}a";

it will ban correctly nicks whit starts a and ends a and between those have 3 to 7 numbers.

but how to change it to ban if nick goes like this

1-3letters3-7numbers1-3letters

Don't know how to add those....
finkoisti
Posts: 5
Joined: Fri Apr 01, 2005 6:01 pm

Post by finkoisti »

found the solution, it seems to be working now.

regex "[a-zA-Z]+[0-9]{3,7}[a-zA-Z]*!.*@.*:.*";
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

finkoisti wrote:regex "[a-zA-Z]+[0-9]{3,7}[a-zA-Z]*!.*@.*:.*";
Here are a few tips... You dont need to have all the .* stuff if there isn't anything you are trying to match at the ends. Unreal spamfilters aren't case-sensitive by default, so you don't need to tell it about the other case. Also, instead of [0-9] you can just use \d, which is the same thing. So you just need

Code: Select all

^[a-z]+\d{3,7}[a-z]*!
Notice I also added the ^ at the beginning, which tells it the string must start with [a-z].

Enjoy! :)
Post Reply