What regex must I use for this clones?

These are old archives. They are kept for historic purposes only.
Post Reply
Bunkerwaiss
Posts: 36
Joined: Thu Dec 27, 2007 8:48 am

What regex must I use for this clones?

Post by Bunkerwaiss »

Hello friends:

I have the following problem

From my webchat, the users get connected with nicks
Invitado001
Invitado002
Invitado003

and so on...

This is OK


BUT
This is NOT OK at all..

Now, the clones' attack comes from nicknames like:
InvitadoJG
InvitadoHr
InvitadoFP
InvitadoxG

...

How can I restrict this, without affecting the users with nicks Invitado001, 002, 003, ###...?

Thank you very much to all =)
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: What regex must I use for this clones?

Post by Jobe »

/spamfilter add u gline 1d Drones! ^Invitado[^\d!]+![^@]+@[^:]+:.*$
Your IP: Image
Your Country: Image
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: What regex must I use for this clones?

Post by Stealth »

Jobe, that is overkill...

just need:

Code: Select all

^Invitado[a-z][a-z]!
Bunkerwaiss
Posts: 36
Joined: Thu Dec 27, 2007 8:48 am

Re: What regex must I use for this clones?

Post by Bunkerwaiss »

Thank you very much Stealth

This regexp solve the problem:

Code: Select all

^Invitado[a-z][A-Z]!
And if I want to ban this?

InvitadoHfTtts

with more than 2 letters after Invitado

And most important..
Where can I a learn about the regexp?

Thks Again
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: What regex must I use for this clones?

Post by Jobe »

http://www.unrealircd.com/files/docs/un ... html#regex <- help for the regex Unreal uses.

This regex should cover anything beginning with "Invitado" and ending with anything that isn't numbers:
^Invitado[^\d!]+!
Your IP: Image
Your Country: Image
Bunkerwaiss
Posts: 36
Joined: Thu Dec 27, 2007 8:48 am

Re: What regex must I use for this clones?

Post by Bunkerwaiss »

Thank you Jobe1986

Altough I solved it in another way, with this:

Code: Select all

^Invitado[a-z][A-Z]$
Anyway, thank you thank you thank you for your answers :)
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Re: What regex must I use for this clones?

Post by Jason »

That last regex you pasted will never, under any circumstances, match ANY user (using the u match).

it tries to make a "Nick!User@Host:Realname" match "CoolguyAzE" or such, exactly. That will never happen. The pattern has no !, @ or :, all of which are guaranteed to be present. Perhaps you wanted the $ to be a !
Why the hell can't my signature be empty?
"Your message contains too few characters."
Post Reply