Help with very simple regexp

These are old archives. They are kept for historic purposes only.
Post Reply
Speed
Posts: 5
Joined: Thu Oct 06, 2005 3:51 pm

Help with very simple regexp

Post by Speed »

Hello and thank you for any kind of help.
I'm a total nooby in the regexps case, so I'm here for help.
I want to gline all users trying to connect with nicks consisting in only numbers like:

Code: Select all

Client connecting on port 6667: O21942941 ([email protected]) [clients]
All my newby attempts to match the nick with ^[0-9]+$ or ^[[:digit:]]+$ or ^\d+$ failed due to my poor understanding of posix regular expressions.

Someone please enlight me :(

Thank you.
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

The idea is good, but spamfilter target u is not only matched against the nick, but against: nick!user@host:realname.

So it would have to be something like: ^\d+!\d+@
Speed
Posts: 5
Joined: Thu Oct 06, 2005 3:51 pm

Post by Speed »

Silly me :oops:

I added your patter and I will keep an eye on it.

Thank you very much for your help
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

You also need to take in mind that the first letter of that nick is a letter, but a number. Nicks cannot start with numbers.
Speed
Posts: 5
Joined: Thu Oct 06, 2005 3:51 pm

Post by Speed »

True, first letter is the letter "O" not a zero, but that is a simple-enough modification to do to the pattern.

Anyway, I've just found out that my spamfilter got obsolete in the moment I've loaded the anti-random module :lol:

Thank you for the good thought anyway
Post Reply