Page 1 of 1
spamfilter in unreal 3.2.3
Posted: Mon Apr 04, 2005 7:21 am
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??
Posted: Mon Apr 04, 2005 11:45 am
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....
Posted: Mon Apr 04, 2005 12:33 pm
by finkoisti
found the solution, it seems to be working now.
regex "[a-zA-Z]+[0-9]{3,7}[a-zA-Z]*!.*@.*:.*";
Posted: Mon Apr 04, 2005 6:52 pm
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
Notice I also added the ^ at the beginning, which tells it the string must start with [a-z].
Enjoy!