mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Chat: Provide a fully-formed protocol for addons to interact with GM commands
Send success/fail state, allow interleaving, and indicate end of output. Add framework for supporting non-human-readable output in commands.
This commit is contained in:
@@ -272,11 +272,15 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (msg.empty())
|
||||
return;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
return;
|
||||
|
||||
if (lang == LANG_ADDON)
|
||||
{
|
||||
if (AddonChannelCommandHandler(this).ParseCommands(msg.c_str()))
|
||||
return;
|
||||
}
|
||||
if (lang != LANG_ADDON)
|
||||
{
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
return;
|
||||
// Strip invisible characters for non-addon messages
|
||||
if (sWorld->getBoolConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
|
||||
stripLineInvisibleChars(msg);
|
||||
|
||||
Reference in New Issue
Block a user