aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-03-12 19:12:24 +0100
committerGitHub <noreply@github.com>2024-03-12 19:12:24 +0100
commit8a9c435ee120d1384c55c419e11f9cf7c3a2e1c2 (patch)
tree3743f265f01f7f368593047bb7b13d5b91c8de64 /src
parentf95be461444fd7fb26c6d9f1586bad6a28fde6b5 (diff)
downloadskyhanni-8a9c435ee120d1384c55c419e11f9cf7c3a2e1c2.tar.gz
skyhanni-8a9c435ee120d1384c55c419e11f9cf7c3a2e1c2.tar.bz2
skyhanni-8a9c435ee120d1384c55c419e11f9cf7c3a2e1c2.zip
Fix fire sale chat hider (#1147)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
index 05e7ab301..31f06ca01 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -327,6 +327,11 @@ class ChatFilter {
"§aYou received §r§b\\+\\d{1,3} §r§a(Mithril|Gemstone) Powder.".toPattern(),
"§aYou received §r(§6|§b)\\+[1-2] (Diamond|Gold) Essence§r§a.".toPattern(),
)
+
+ private val fireSalePattern by RepoPattern.pattern(
+ "chat.firesale",
+ "§6§k§lA§r §c§lFIRE SALE §r§6§k§lA(?:\\n|.)*"
+ )
private val fireSalePatterns = listOf(
"§c♨ §eFire Sales for .* §eare starting soon!".toPattern(),
"§c\\s*♨ .* (?:Skin|Rune|Dye) §e(?:for a limited time )?\\(.* §eleft\\)(?:§c|!)".toPattern(),
@@ -417,7 +422,7 @@ class ChatFilter {
config.winterGift && message.isPresent("winter_gift") -> "winter_gift"
config.powderMining && message.isPresent("powder_mining") -> "powder_mining"
- config.fireSale && message.isPresent("fire_sale") -> "fire_sale"
+ config.fireSale && (fireSalePattern.matches(message) || message.isPresent("fire_sale")) -> "fire_sale"
generalConfig.hideJacob && !GardenAPI.inGarden() && anitaFortunePattern.matches(message) -> "jacob_event"
generalConfig.hideSkyMall && !LorenzUtils.inMiningIsland() && skymallPerkPattern.matches(message) -> "skymall"