This commit is contained in:
aozhiwei 2020-12-10 11:49:40 +08:00
parent 6a8b071308
commit 22da1c6a3d
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "guild.h" #include "guild.h"
#include "guildmgr.h" #include "guildmgr.h"
#include "typeconvert.h" #include "typeconvert.h"
#include "metamgr.h"
void ChatMgr::Init() void ChatMgr::Init()
{ {

View File

@ -27,6 +27,7 @@
#include "handlermgr.h" #include "handlermgr.h"
#include "jsondatamgr.h" #include "jsondatamgr.h"
#include "chatmgr.h" #include "chatmgr.h"
#include "metamgr.h"
#include "ss_msgid.pb.h" #include "ss_msgid.pb.h"
#include "framework/cpp/httpclientpool.h" #include "framework/cpp/httpclientpool.h"
@ -566,6 +567,8 @@ void Player::_CMSendChatMsg(f8::MsgHdr& hdr, const cs::CMSendChatMsg& msg)
if (!IsValidChatChannel(msg.chat_channel())) { if (!IsValidChatChannel(msg.chat_channel())) {
return; return;
} }
cs::CMSendChatMsg* mutable_msg = (cs::CMSendChatMsg*)&msg;
mutable_msg->set_msg_body(MetaMgr::Instance()->ReplaceDirtyWord(msg.msg_body(), '*'));
switch (msg.chat_channel()) { switch (msg.chat_channel()) {
case kCCWorld: case kCCWorld:
ChatMgr::Instance()->ProcWorldChat(this, msg); ChatMgr::Instance()->ProcWorldChat(this, msg);