From 93e67ad692e25c0d13d63271a3536c16571aebd0 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sun, 22 Aug 2021 18:06:40 +0900 Subject: - Bug Report 211 ([MVP+] xxx joined the [Prefix] lobby!) --- .../cosmetics/chatreplacers/ChatReplacerSocialOptions.java | 4 ++++ .../cosmetics/chatreplacers/ChatReplacerViewProfile.java | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/main') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java index 62e8e0af..a1afd592 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java @@ -65,6 +65,10 @@ public class ChatReplacerSocialOptions implements IChatReplacer { char c = s.charAt(0); if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') { lastValidNickname = i; + if (i >= 1) { + String str = TextUtils.stripColor(splitInto[i-1]); + if (str.startsWith("[") && str.endsWith("]"))break; + } } } if (lastValidNickname == -1) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java index 51787951..56430480 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java @@ -68,6 +68,10 @@ public class ChatReplacerViewProfile implements IChatReplacer { char c = s.charAt(0); if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') { lastValidNickname = i; + if (i >= 1) { + String str = TextUtils.stripColor(splitInto[i-1]); + if (str.startsWith("[") && str.endsWith("]"))break; + } } } if (lastValidNickname == -1) continue; -- cgit