U3Games

Games | Desarrollo & Soporte => L2 | Sección de Servidores => Lineage => L2 | Implementaciones => Mensaje iniciado por: Swarlog en Jul 26, 2025, 10:55 PM

Título: Bloqueo de nombres de personajes
Publicado por: Swarlog en Jul 26, 2025, 10:55 PM
Index: Config.java
+/** Character name restriction */
+public static String[] FORBIDDEN_NAMES;
+FORBIDDEN_NAMES = gold.getProperty("ForbiddenNames", "").split(",");

Index: network/clientpackets/CharacterCreate.java
+
+
+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 (!Util.isValidPlayerName(_name))
+{
+sendPacket(new CharCreateFail(CharCreateFail.REASON_INCORRECT_NAME));
+return;
+}

Index: config/properties
+# ================================================================
+#                   Character name restriction
+# ================================================================
+
+
+# Disallow characters to have a name which contains the words
+# Split them with ",". Example: announcements,announce...
+ForbiddenNames = annou,ammou,amnou,anmou,anou,amou