Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P Heroes
- Index: aCis_gameserver/config/server.ini
- ===================================================================
- --- aCis_gameserver/config/server.ini (revision 12)
- +++ aCis_gameserver/config/server.ini (working copy)
- @@ -64,6 +64,9 @@
- # Allow delete chars after D days, 0 = feature disabled.
- DeleteCharAfterDays = 3
- +#Restricted names for characters
- +RestrictedNames = fuck,dildo,admin
- +
- # Define how many players are allowed to play simultaneously on your server.
- MaximumOnlineUsers = 500
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 7)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
- @@ -83,6 +83,18 @@
- return;
- }
- + if(Config.FORBIDDEN_NAMES.length > 1)
- + {
- + for(String st : Config.FORBIDDEN_NAMES)
- + {
- + if(_name.toLowerCase().contains(st.toLowerCase()))
- + {
- + sendPacket(new CharCreateFail(CharCreateFail.REASON_INCORRECT_NAME));
- + return;
- + }
- + }
- + }
- +
- if (_face > 2 || _face < 0)
- {
- sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
- Index: aCis_gameserver/java/net/sf/l2j/Config.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/Config.java (revision 12)
- +++ aCis_gameserver/java/net/sf/l2j/Config.java (working copy)
- @@ -538,6 +538,7 @@
- /** clients related */
- public static int DELETE_DAYS;
- + public static String[] FORBIDDEN_NAMES;
- public static int MAXIMUM_ONLINE_USERS;
- public static int MIN_PROTOCOL_REVISION;
- public static int MAX_PROTOCOL_REVISION;
- @@ -1385,6 +1386,7 @@
- SERVER_LIST_TESTSERVER = server.getProperty("TestServer", false);
- DELETE_DAYS = server.getProperty("DeleteCharAfterDays", 7);
- + FORBIDDEN_NAMES = server.getProperty("RestrictedNames", "").split(",");
- MAXIMUM_ONLINE_USERS = server.getProperty("MaximumOnlineUsers", 100);
- MIN_PROTOCOL_REVISION = server.getProperty("MinProtocolRevision", 730);
- MAX_PROTOCOL_REVISION = server.getProperty("MaxProtocolRevision", 746);
Advertisement
Add Comment
Please, Sign In to add comment