aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authoringle <inglettronald@gmail.com>2022-11-18 08:33:12 -0600
committeringle <inglettronald@gmail.com>2022-11-18 08:33:12 -0600
commitcf97f7cf37b578cbf0a2ad01ebc12b973a2dbc24 (patch)
treeed68e65b893f1eac77f5f7af827cc4462645daf9 /src/main/kotlin
parentd33ce75bea49993447b3181e7ca78e79d9767e73 (diff)
downloadDulkirMod-cf97f7cf37b578cbf0a2ad01ebc12b973a2dbc24.tar.gz
DulkirMod-cf97f7cf37b578cbf0a2ad01ebc12b973a2dbc24.tar.bz2
DulkirMod-cf97f7cf37b578cbf0a2ad01ebc12b973a2dbc24.zip
-fix bridge and croesus stuff
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/dulkirmod/config/Config.kt3
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/Bridge.kt6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/kotlin/dulkirmod/config/Config.kt b/src/main/kotlin/dulkirmod/config/Config.kt
index 9075b4f..2fce7ed 100644
--- a/src/main/kotlin/dulkirmod/config/Config.kt
+++ b/src/main/kotlin/dulkirmod/config/Config.kt
@@ -493,7 +493,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so
)
setCategoryDescription(
"Bridge",
- "If your bridge format does not work, message me on discord and I can probably add it."
+ "Does not work for replies, or having spaces in your discord username. I will not fix these " +
+ "issues. If you have unrelated problems, dm me on discord."
)
}
diff --git a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
index 326ab96..835d64d 100644
--- a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
@@ -8,11 +8,11 @@ import net.minecraftforge.client.event.ClientChatReceivedEvent
object Bridge {
private val guildFormat =
- "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: ([\\w ]+) > .+".toRegex()
+ "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+) > .+".toRegex()
private val alternateFormat =
- "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: ([\\w ]+): .+".toRegex()
+ "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+): .+".toRegex()
private val otherAltFormat =
- "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: ([\\w ]+) » .+".toRegex()
+ "^(§2Guild|§3Officer) > (?:\\S+ )?([\\w§]{3,18})(?: §[a-z0-9]\\[[A-Z]+])?§f: (\\w+) » .+".toRegex()
fun handle(event: ClientChatReceivedEvent) {
val message = event.message.unformattedText