Prevent creating characters with names like admin, gm etc.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
CubAfull
Posts: 37
Joined: Wed Feb 03, 2010 9:02 pm

Prevent creating characters with names like admin, gm etc.

Post by CubAfull »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 3967:
L2JDP Revision 7115:

Hello ppl,

Can I use this template to prevent users from creating characters with names like admin, gm, gamemaster...?

Code: Select all

CnameTemplate = (?!.*(?i)(?:admin|gamemaster|gm).*)^[a-zA-Z0-9]{3,16}
if anyone has a solution that works, please write it... :)

Thank you.
I Cuba...
User avatar
CubAfull
Posts: 37
Joined: Wed Feb 03, 2010 9:02 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by CubAfull »

BTW this template is executed by java or by pyton?? :oops:
Not the same template for both...
pyton:

Code: Select all

(?i)(?!.*(?:admin|gamemaster|gm).*)^[a-z0-9]{3,16}
no tested (I can't right now :( )
I Cuba...
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by Gnacik »

try patch from BigBoss :

http://www.pastebin.cz/621a25ec50d5f6
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by denser »

it must be commited as option :)
may be it should work like kinda filter?

?admin?,admin*...etc
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Prevent creating characters with names like admin, gm etc.

Post by jurchiks »

just btw, it's forbidde N, not D
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by denser »

jurchiks wrote:just btw, it's forbidde N, not D
big deal :) you can post patch with corrections. it not to hard :)
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
CubAfull
Posts: 37
Joined: Wed Feb 03, 2010 9:02 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by CubAfull »

Gnacik wrote:try patch from BigBoss :

http://www.pastebin.cz/621a25ec50d5f6

Please DEV, commit this mod, its realy important!!

I have this working in my server for 2 months and no problem :D
I Cuba...
Onepamopa
Posts: 113
Joined: Thu Jan 14, 2010 6:35 pm
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by Onepamopa »

+1 to commit !
we had some issues with charnames like those ... (banned most of them, but they think of something new etc..) :)
----------------------------------------------------
ICQ: 287731217
Skype: d.i.dobrev
IRC: Onepamopa
----------------------------------------------------
User avatar
CubAfull
Posts: 37
Joined: Wed Feb 03, 2010 9:02 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by CubAfull »

Gnacik wrote:try patch from BigBoss :

http://www.pastebin.cz/621a25ec50d5f6
The pastebin link don't work anymore :(

please post again... can't find the file where i save this mod. :oops:
I Cuba...
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: Prevent creating characters with names like admin, gm etc.

Post by Szponiasty »

I have another question: how to filter national chars like óźłą etc?
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by Gnacik »

server.properties
CnameTemplate = [A-Za-z0-9-]{3,16}
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by hope »

i have this in the config
CnameTemplate = [A-Za-z0-9-]{3,16}
but get this message in the console if i make the char admin
ERROR : Character name pattern of config is wrong!
so what is wrong

this is the full thing

Code: Select all

 # ---------------------------------------------------------------------------# Misc Player Settings# --------------------------------------------------------------------------- # Character name template.# Examples:# CnameTemplate = [A-Z][a-z]{3,3}[A-Za-z0-9]*# The above setting will allow names with first capital letter, next three small letters,# and any letter (case insensitive) or number, like OmfgWTF1# CnameTemplate = [A-Z][a-z]*# The above setting will allow names only of letters with first one capital, like Omfgwtf# Default .* (allows any symbol)CnameTemplate = [A-Za-z0-9-]{3,16} # This setting restricts names players can give to their pets.# See CnameTemplate for detailsPetNameTemplate = [A-Za-z0-9-]{3,16} # Maximum number of characters per account.# Default: 7 (client limit)CharMaxNumber = 7
Last edited by hope on Tue Apr 13, 2010 10:43 pm, edited 2 times in total.
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Prevent creating characters with names like admin, gm etc.

Post by Probe »

it might be the extra hyphen
should be
CnameTemplate = [A-Za-z0-9]{3-16}
and not
CnameTemplate = [A-Za-z0-9-]{3-16}
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by hope »

tried it both ways
i have it now the way Gnacik has it showen on his post
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Prevent creating characters with names like admin, gm etc.

Post by hope »

CnameTemplate = [A-Za-z0-9-]{3,16}
this works u cant make the name gm but u can make the name admin any one know how to stop the admin name being made
Post Reply