Page 1 of 1
What regex must I use for this clones?
Posted: Mon Mar 24, 2008 5:28 pm
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 =)
Re: What regex must I use for this clones?
Posted: Mon Mar 24, 2008 6:25 pm
by Jobe
/spamfilter add u gline 1d Drones! ^Invitado[^\d!]+![^@]+@[^:]+:.*$
Re: What regex must I use for this clones?
Posted: Mon Mar 24, 2008 9:28 pm
by Stealth
Jobe, that is overkill...
just need:
Re: What regex must I use for this clones?
Posted: Wed Mar 26, 2008 9:16 am
by Bunkerwaiss
Thank you very much
Stealth
This regexp solve the problem:
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
Re: What regex must I use for this clones?
Posted: Wed Mar 26, 2008 1:09 pm
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!]+!
Re: What regex must I use for this clones?
Posted: Wed Mar 26, 2008 7:40 pm
by Bunkerwaiss
Thank you
Jobe1986
Altough I solved it in another way, with this:
Anyway, thank you thank you thank you for your answers

Re: What regex must I use for this clones?
Posted: Fri Mar 28, 2008 3:34 am
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 !