From cf97f7cf37b578cbf0a2ad01ebc12b973a2dbc24 Mon Sep 17 00:00:00 2001 From: ingle Date: Fri, 18 Nov 2022 08:33:12 -0600 Subject: -fix bridge and croesus stuff --- src/main/kotlin/dulkirmod/config/Config.kt | 3 ++- src/main/kotlin/dulkirmod/features/chat/Bridge.kt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin') 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 -- cgit