mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Merge pull request #11840 from Rochet2/AddonMessaging
Core/Chat: Fix AddonMessaging and logging
This commit is contained in:
@@ -107,20 +107,12 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
case CHAT_MSG_GUILD:
|
||||
case CHAT_MSG_BATTLEGROUND:
|
||||
case CHAT_MSG_WHISPER:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
{
|
||||
std::string msg = "";
|
||||
recvData >> msg;
|
||||
|
||||
if (msg.empty())
|
||||
return;
|
||||
|
||||
sScriptMgr->OnPlayerChat(sender, uint32(CHAT_MSG_ADDON), lang, msg);
|
||||
}
|
||||
|
||||
// Disabled addon channel?
|
||||
// check if addon messages are disabled
|
||||
if (!sWorld->getBoolConfig(CONFIG_ADDON_CHANNEL))
|
||||
{
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
TC_LOG_ERROR("network", "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination",
|
||||
|
||||
Reference in New Issue
Block a user