From 40247f6b4385aea2e484e4703e8eb672bcd1c228 Mon Sep 17 00:00:00 2001 From: Learath Date: Fri, 12 Jun 2020 15:53:18 +0300 Subject: [PATCH] Fix chat --- src/engine/server.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/engine/server.h b/src/engine/server.h index c13243dd2..0868dc18e 100644 --- a/src/engine/server.h +++ b/src/engine/server.h @@ -88,12 +88,23 @@ public: int SendPackMsgTranslate(CNetMsg_Sv_Chat *pMsg, int Flags, int ClientID) { - if (pMsg->m_ClientID >= 0 && !Translate(pMsg->m_ClientID, ClientID)) + if(pMsg->m_ClientID >= 0 && !Translate(pMsg->m_ClientID, ClientID)) { str_format(msgbuf, sizeof(msgbuf), "%s: %s", ClientName(pMsg->m_ClientID), pMsg->m_pMessage); pMsg->m_pMessage = msgbuf; pMsg->m_ClientID = VANILLA_MAX_CLIENTS - 1; } + + if(pMsg->m_ClientID >= 0 && IsSixup(ClientID)) + { + protocol7::CNetMsg_Sv_Chat Msg7; + Msg7.m_ClientID = pMsg->m_ClientID; + Msg7.m_pMessage = pMsg->m_pMessage; + Msg7.m_Mode = pMsg->m_Team > 0 ? protocol7::CHAT_TEAM : protocol7::CHAT_ALL; + Msg7.m_TargetID = -1; + return SendPackMsgOne(&Msg7, Flags, ClientID); + } + return SendPackMsgOne(pMsg, Flags, ClientID); }