diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-02-25 12:52:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 12:52:08 +0100 |
commit | 67261413a76819ad2ef16182f56e2c4b61b21012 (patch) | |
tree | 69ff80409ace002885793dfef0df2af20f0ad65a /src/main/java/at/hannibal2/skyhanni/features | |
parent | 2a8edee6275a4abe3375351455c27d2ee56f9c36 (diff) | |
download | skyhanni-67261413a76819ad2ef16182f56e2c4b61b21012.tar.gz skyhanni-67261413a76819ad2ef16182f56e2c4b61b21012.tar.bz2 skyhanni-67261413a76819ad2ef16182f56e2c4b61b21012.zip |
Fixed multiple edge cases with /gfs. (#1055)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt index 424d72198..331c19fb0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/tabcomplete/GetFromSacksTabComplete.kt @@ -25,12 +25,12 @@ object GetFromSacksTabComplete { if (event.senderIsSkyhanni()) return event - if (event.splitMessage.isEmpty()) return event + if (event.splitMessage.size < 3) return event - val rawName = event.splitMessage[1].uppercase() + val rawName = event.splitMessage.drop(1).dropLast(1).joinToString(" ") val realName = rawName.replace("_", " ") if (realName == rawName) return event - if (realName !in GetFromSackAPI.sackListNames) return event + if (realName.uppercase() !in GetFromSackAPI.sackListNames) return event return event.eventWithNewMessage(event.message.replace(rawName, realName)) } |