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 » Thu Oct 06, 2005 3:58 pm

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 (O21942941@82-166-230-177.barak.net.il) [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: 1882
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop » Thu Oct 06, 2005 4:21 pm

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 » Thu Oct 06, 2005 5:11 pm

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 » Thu Oct 06, 2005 6:07 pm

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 » Thu Oct 06, 2005 6:34 pm

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