Hi everyone,
I've had this flood of spambots on my network recently and I've been trying to write a regex that is going to kill them but not kill some other users.
Example bot nicks:
philipmM54
josieafF22
markasP07
etc
I want a regex that is going to kill nicknames that have a capital letter and 2 numbers in the last part of the nickname killed.
The regex I wrote is:
[A-Z]{1}[0-9]{2}!
And I've tried:
^[A-Z]{1}[0-9]{2}!
and also:
^\w+[A-Z]{1}[0-9]{2}!
All will kill the bots but also kill nicknames such as
snowman01
Scrawl07
Tunix21
Any ideas? I do not want to kill nicknames that end in 2 numbers but 1 capital AND 2 numbers.
By the way I am entering these by the /spamfilter command not by putting them in the .conf file
Any help is muchly appreciated!
Help with regex for bots
Help with regex for bots
That is not dead which can eternal lie, yet with strange eons, even death, may die.
H.P. Lovecraft
H.P. Lovecraft
The documentation clearly states that spamfiler are case insensitive.
If you want them to be case sensitive, you have to turn case insensitivity off with (?-i).
http://www.vulnscan.org/UnrealIRCd/unre ... #regexcase
So you could try something like(Caution: Completely untested!)
If you want them to be case sensitive, you have to turn case insensitivity off with (?-i).
http://www.vulnscan.org/UnrealIRCd/unre ... #regexcase
So you could try something like
Code: Select all
^[a-z]+(?-i:[A-Z])[0-9]{2}!
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
- Coleman Hawkins