aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java4
2 files changed, 8 insertions, 0 deletions
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;