Skip to content

Commit

Permalink
fix fire sale chat hider
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsEmpa committed Mar 12, 2024
1 parent 498afd5 commit 90a2d6b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 90a2d6b

Please sign in to comment.