fix: BG announcer filter was suppressing ALL chat messages

The filter matched ALL chat types for patterns like "[H:" + "A:" which
are common in normal messages. Any SAY/WHISPER/GUILD message containing
both substrings was silently dropped. This broke all incoming chat.

Now only filters SYSTEM messages and only matches specific BG announcer
keywords: "Queue status", "BG Queue", "BGAnnouncer".
This commit is contained in:
Kelsi 2026-03-28 15:31:16 -07:00
parent 6edcad421b
commit 9666b871f8

View file

@ -197,16 +197,13 @@ void ChatHandler::handleMessageChat(network::Packet& packet) {
}
// Filter BG queue announcer spam (server-side module on ChromieCraft/AzerothCore).
// Can arrive as SYSTEM, CHANNEL, or even SAY/YELL from special NPCs.
{
// Only filter SYSTEM messages to avoid suppressing player chat.
if (data.type == ChatType::SYSTEM) {
const auto& msg = data.message;
if (msg.find("Queue status") != std::string::npos ||
msg.find("BG Queue") != std::string::npos ||
msg.find("Announcer]") != std::string::npos ||
msg.find("BGAnnouncer") != std::string::npos ||
(msg.find("[H:") != std::string::npos && msg.find("A:") != std::string::npos) ||
(msg.find("[H: ") != std::string::npos && msg.find(", A: ") != std::string::npos)) {
return; // Suppress BG queue announcer spam
msg.find("BGAnnouncer") != std::string::npos) {
return;
}
}