Skip to content

Commit 129e399

Browse files
committed
update(src): Remove ChatProcessor on Windows
1 parent c1f512c commit 129e399

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/server/chat/chat.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ SH_DECL_EXTERN8_void(IGameEventSystem, PostEventAbstract, SH_NOATTRIB, 0, CSplit
1818

1919
void ChatProcessor::Initialize()
2020
{
21+
#ifndef _WIN32
2122
SH_ADD_HOOK_MEMFUNC(IGameEventSystem, PostEventAbstract, g_pGameEventSystem, this, &ChatProcessor::PostEvent, false);
23+
#endif
2224
}
2325

2426
void ChatProcessor::Shutdown()
2527
{
28+
#ifndef _WIN32
2629
SH_REMOVE_HOOK_MEMFUNC(IGameEventSystem, PostEventAbstract, g_pGameEventSystem, this, &ChatProcessor::PostEvent, false);
30+
#endif
2731
}
2832

2933
void ChatError(std::string text)
@@ -153,6 +157,7 @@ std::string formatPlayerMessage(Player* player, void* controller, std::string pl
153157
return ProcessColor(" " + placeholder, schema::GetProp<int>(controller, "CBaseEntity", "m_iTeamNum"));
154158
}
155159

160+
#ifndef _WIN32
156161
void ChatProcessor::PostEvent(CSplitScreenSlot nSlot, bool bLocalOnly, int nClientCount, const uint64* clients, INetworkMessageInternal* pEvent, const CNetMessage* pData, unsigned long nSize, NetChannelBufType_t bufType)
157162
{
158163
if (pEvent->GetNetMessageInfo()->m_MessageId == 118) {
@@ -182,4 +187,5 @@ void ChatProcessor::PostEvent(CSplitScreenSlot nSlot, bool bLocalOnly, int nClie
182187
um.SetString("msg_name", formatPlayerMessage(player, controller, it->second.c_str(), um.GetRepeatedString("params", 2), true).c_str());
183188
}
184189
}
185-
}
190+
}
191+
#endif

0 commit comments

Comments
 (0)