Guest User

Untitled

a guest
Jun 18th, 2016
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P Heroes
  3. Index: aCis_gameserver/config/server.ini
  4. ===================================================================
  5. --- aCis_gameserver/config/server.ini (revision 12)
  6. +++ aCis_gameserver/config/server.ini (working copy)
  7. @@ -64,6 +64,9 @@
  8. # Allow delete chars after D days, 0 = feature disabled.
  9. DeleteCharAfterDays = 3
  10.  
  11. +#Restricted names for characters
  12. +RestrictedNames = fuck,dildo,admin
  13. +
  14. # Define how many players are allowed to play simultaneously on your server.
  15. MaximumOnlineUsers = 500
  16.  
  17. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
  18. ===================================================================
  19. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 7)
  20. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
  21. @@ -83,6 +83,18 @@
  22. return;
  23. }
  24.  
  25. + if(Config.FORBIDDEN_NAMES.length > 1)
  26. + {
  27. + for(String st : Config.FORBIDDEN_NAMES)
  28. + {
  29. + if(_name.toLowerCase().contains(st.toLowerCase()))
  30. + {
  31. + sendPacket(new CharCreateFail(CharCreateFail.REASON_INCORRECT_NAME));
  32. + return;
  33. + }
  34. + }
  35. + }
  36. +
  37. if (_face > 2 || _face < 0)
  38. {
  39. sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
  40. Index: aCis_gameserver/java/net/sf/l2j/Config.java
  41. ===================================================================
  42. --- aCis_gameserver/java/net/sf/l2j/Config.java (revision 12)
  43. +++ aCis_gameserver/java/net/sf/l2j/Config.java (working copy)
  44. @@ -538,6 +538,7 @@
  45.  
  46. /** clients related */
  47. public static int DELETE_DAYS;
  48. + public static String[] FORBIDDEN_NAMES;
  49. public static int MAXIMUM_ONLINE_USERS;
  50. public static int MIN_PROTOCOL_REVISION;
  51. public static int MAX_PROTOCOL_REVISION;
  52. @@ -1385,6 +1386,7 @@
  53. SERVER_LIST_TESTSERVER = server.getProperty("TestServer", false);
  54.  
  55. DELETE_DAYS = server.getProperty("DeleteCharAfterDays", 7);
  56. + FORBIDDEN_NAMES = server.getProperty("RestrictedNames", "").split(",");
  57. MAXIMUM_ONLINE_USERS = server.getProperty("MaximumOnlineUsers", 100);
  58. MIN_PROTOCOL_REVISION = server.getProperty("MinProtocolRevision", 730);
  59. MAX_PROTOCOL_REVISION = server.getProperty("MaxProtocolRevision", 746);
Advertisement
Add Comment
Please, Sign In to add comment