Procházet zdrojové kódy

BETA: Minor Improvement (using regex) for [8039] by qwerty13. Now you can write "." like in retail.

MELERIX před 14 roky
rodič
revize
a6291a2de0

+ 5 - 1
L2J_DataPack_BETA/data/scripts/handlers/chathandlers/ChatAll.java

@@ -90,7 +90,11 @@ public class ChatAll implements IChatHandler
 				return;
 			}
 			
-			if (text.startsWith(".") && !text.startsWith(".."))
+			/**
+			 * Match the character "." literally (Exactly 1 time)
+			 * Match any character that is NOT a . character. Between one and unlimited times as possible, giving back as needed (greedy)
+			 */
+			if (text.matches("\\.{1}[^\\.]+"))
 				activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INCORRECT_SYNTAX));
 			else
 			{