mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Warden: Add Lua checks to Warden (PR #25286)
(cherry picked from commit 0531463a3c)
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Util.h"
|
||||
#include "Warden.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include <algorithm>
|
||||
@@ -217,7 +218,6 @@ void WorldSession::HandleChatMessage(ChatMsg type, Language lang, std::string ms
|
||||
if (msg.size() > 255)
|
||||
return;
|
||||
|
||||
|
||||
if (msg.empty())
|
||||
return;
|
||||
|
||||
@@ -466,6 +466,13 @@ void WorldSession::HandleChatAddonMessage(ChatMsg type, std::string prefix, std:
|
||||
if (prefix.empty() || prefix.length() > 16)
|
||||
return;
|
||||
|
||||
// Our Warden module also uses SendAddonMessage as a way to communicate Lua check results to the server, see if this is that
|
||||
if (type == CHAT_MSG_GUILD)
|
||||
{
|
||||
if (_warden && _warden->ProcessLuaCheckResponse(text))
|
||||
return;
|
||||
}
|
||||
|
||||
// Disabled addon channel?
|
||||
if (!sWorld->getBoolConfig(CONFIG_ADDON_CHANNEL))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user