mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/ChatLogger): Differentiate addon whisper from player whisper (#19441)
* fix(Scripts/ChatLogger): Differentiate addon whisper from player whisper * closes https://github.com/azerothcore/azerothcore-wotlk/issues/19439 * closes https://github.com/azerothcore/azerothcore-wotlk/issues/17570 * fix build
This commit is contained in:
@@ -697,6 +697,26 @@ Logger.spells.scripts=2,Console Errors
|
||||
#Logger.bg.battleground=4,Console Server
|
||||
#Logger.bg.reportpvpafk=4,Console Server
|
||||
#Logger.calendar=4,Console Server
|
||||
#Logger.chat.say=4,Console Chat
|
||||
#Logger.chat.emote=4,Console Chat
|
||||
#Logger.chat.yell=4,Console Chat
|
||||
#Logger.chat.whisper=4,Console Chat
|
||||
#Logger.chat.party=4,Console Chat
|
||||
#Logger.chat.raid=4,Console Chat
|
||||
#Logger.chat.bg=4,Console Chat
|
||||
#Logger.chat.guild=4,Console Chat
|
||||
#Logger.chat.guild.officer=4,Console Chat
|
||||
#Logger.chat.channel=4,Console Chat
|
||||
#Logger.chat.addon.msg=4,Console Chat
|
||||
#Logger.chat.addon.emote=4,Console Chat
|
||||
#Logger.chat.addon.yell=4,Console Chat
|
||||
#Logger.chat.addon.whisper=4,Console Chat
|
||||
#Logger.chat.addon.party=4,Console Chat
|
||||
#Logger.chat.addon.raid=4,Console Chat
|
||||
#Logger.chat.addon.bg=4,Console Chat
|
||||
#Logger.chat.addon.guild=4,Console Chat
|
||||
#Logger.chat.addon.guild.officer=4,Console Chat
|
||||
#Logger.chat.addon.channel=4,Console Chat
|
||||
#Logger.chat.log=4,Console Server
|
||||
#Logger.chat.log.addon=4,Console Server
|
||||
#Logger.chat.system=4,Console Server
|
||||
|
||||
@@ -64,10 +64,15 @@ public:
|
||||
player->GetName(), chatType, lang, msg);
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player* receiver) override
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
|
||||
{
|
||||
LOG_INFO("chat.whisper", "Player {} tells {}: {}",
|
||||
player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg);
|
||||
//! NOTE:
|
||||
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
|
||||
std::string logType = (lang != LANG_ADDON) ? "chat." : "chat.addon.";
|
||||
std::string msgType = "whisper";
|
||||
|
||||
LOG_INFO(logType + msgType, "Player {} {} {}: {}",
|
||||
player->GetName(), msgType, receiver ? receiver->GetName() : "<unknown>", msg);
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
|
||||
|
||||
Reference in New Issue
Block a user