Jump to content

Question

Posted

Hello...im using l2j source and Im Looking a "protection" that does not allow account create when account name for example is admin or gm or bot etc. 

 Im searching for java code,or The java file in source of inside i can add a protection like this.Every help is receiver And sorry for my bad English :D

 

p.s haters pls just ignore that topic :)

 

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

not allow account create when account name for example is admin or gm or bot etc. 

 

Here you are:

 

 

package net.sf.l2j.loginserver.LoginController.java;


+if (user.equals("administrator"))
+    return false;
+else if ((user != null) && (user.length()) >= 2 && (user.length() <= 14) && !user.equals(password))
-if ((user.length()) >= 2 && (user.length() <= 14))

On me works fine :)

Edited by T9Text
  • 0
Posted (edited)

Maybe on LoginController.java

 

do something like this....

 

+					if (user.startsWith("Admin") || user.startsWith("Bot"))
+                                             //your warn message here
+            		                      return false;
+					else if ((user.length() >= 2) && (user.length() <= 14))
-					if ((user.length() >= 2) && (user.length() <= 14))

Im not sure :/


(About haters.... [GR]Toulaxiston egw prospa8w na ton help[/GR])

Edited by T9Text
  • 0
Posted

Maybe on LoginController.java

 

do something like this....

 

 

+					if (user.startsWith("Admin"))
+            		      return false;
+					else if ((user.length() >= 2) && (user.length() <= 14))
-					if ((user.length() >= 2) && (user.length() <= 14))

Im not sure :/

 

 

(About haters.... [GR]Toulaxiston egw prospa8w na ton help[/GR])

I will try it and i reply with resaults. Thanks for your answer and your try :)

  • 0
Posted

I will try it and i reply with resaults. Thanks for your answer and your try :)

Almost all packs has restrictions for nickname creation in configs.

If i remember well it should be in server.properties

  • 0
Posted

It has nothing to do with the LoginController, but with CharacterCreate... Well, I have the right thing for you, enjoy.

 

Make sure you add the lines manually cuz it's adapted for my pack that obviously has custom .properties file.

 

http://pastebin.com/XXZgncvu

  • 0
Posted

It has nothing to do with the LoginController, but with CharacterCreate... Well, I have the right thing for you, enjoy.

 

Make sure you add the lines manually cuz it's adapted for my pack that obviously has custom .properties file.

 

http://pastebin.com/XXZgncvu

 

I think he want Account Names... not Char name :P

  • 0
Posted

It has nothing to do with the LoginController, but with CharacterCreate... Well, I have the right thing for you, enjoy.

 

Make sure you add the lines manually cuz it's adapted for my pack that obviously has custom .properties file.

 

http://pastebin.com/XXZgncvu

thanks for your answer but as T9Text says i need for Account create and not character create. 

 

Almost all packs has restrictions for nickname creation in configs.

If i remember well it should be in server.properties

I found only for character names and not For account names in configs. I need restrictions when create account and not when create character

Thanks for your answer :)

  • 0
Posted (edited)

The most simple solution can be use those account names, you create them, so they will be "already in use". :D

Edited by MeetYourMaker
  • 0
Posted

The most simple solution can be use those account names, you create them, so they will be "already in use". :D

 

my basicaly problem is not the admin names etc. i found 1bug with language differences and with that bug you can double login

  • 0
Posted

Here you are:

 

 

package net.sf.l2j.loginserver.LoginController.java;


+if (user.equals("administrator"))
+    return false;
+else if ((user != null) && (user.length()) >= 2 && (user.length() <= 14) && !user.equals(password))
-if ((user.length()) >= 2 && (user.length() <= 14))
On me works fine :)

thanks :-D can i ask you something more? i want add this code but if in the word contains 1 letter.you understund me?

  • 0
Posted

thanks :-D can i ask you something more? i want add this code but if in the word contains 1 letter.you understund me?

 

Send me pm on greek man :) i dont understand that ... :$

Guest
This topic is now closed to further replies.


×
×
  • Create New...