aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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 -> ""
}