aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-01 10:57:30 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-01 10:57:30 +0100
commit9f2118dfc218a6b97e4d7d67e7fb9dbd7431cf54 (patch)
treeb993166eb2fdff1928e6cfe8b26072be00554626 /src
parent18735f84f7ecdfc38c5d01f2f8a210e2a1613779 (diff)
downloadskyhanni-9f2118dfc218a6b97e4d7d67e7fb9dbd7431cf54.tar.gz
skyhanni-9f2118dfc218a6b97e4d7d67e7fb9dbd7431cf54.tar.bz2
skyhanni-9f2118dfc218a6b97e4d7d67e7fb9dbd7431cf54.zip
Hide the repeating fire sale reminder chat messages.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
index 42cca5b59..f37e66705 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
@@ -74,6 +74,12 @@ public class FilterTypesConfig {
@FeatureToggle
public boolean profileJoin = true;
+ @Expose
+ @ConfigOption(name = "Fire Sale", desc = "Hide the repeating fire sale reminder chat messages.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean fireSale = true;
+
//TODO remove
@Expose
@ConfigOption(name = "Others", desc = "Hide other annoying messages.")
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 91ba44ce2..b4cb10958 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -291,6 +291,9 @@ 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".toPattern(),
)
+ private val fireSalePatterns = listOf(
+ "§c♨ §eFire Sales for .* §eare starting soon!".toPattern(),
+ )
private val powderMiningMessages = listOf(
"§aYou uncovered a treasure chest!",
"§aYou received §r§f1 §r§aWishing Compass§r§a.",
@@ -300,6 +303,9 @@ class ChatFilter {
// Useful, maybe in another chat
"§6You have successfully picked the lock on this chest!",
)
+ private val fireSaleMessages = listOf(
+ "§6§k§lA§r §c§lFIRE SALE §r§6§k§lA",
+ )
private val patternsMap: Map<String, List<Pattern>> = mapOf(
"lobby" to lobbyPatterns,
@@ -315,6 +321,7 @@ class ChatFilter {
"annoying_spam" to annoyingSpamPatterns,
"winter_gift" to winterGiftPatterns,
"powder_mining" to powderMiningPatterns,
+ "fire_sale" to fireSalePatterns,
)
private val messagesMap: Map<String, List<String>> = mapOf(
@@ -331,6 +338,7 @@ class ChatFilter {
"useless_warning" to uselessWarningMessages,
"annoying_spam" to annoyingSpamMessages,
"powder_mining" to powderMiningMessages,
+ "fire_sale" to fireSaleMessages,
)
private val messagesContainsMap: Map<String, List<String>> = mapOf(
"lobby" to lobbyMessagesContains,
@@ -367,6 +375,8 @@ 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"
+
else -> ""
}