1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Screen incoming GameMessages because we cannot trust the server (because the server trusts other clients too much)

This commit is contained in:
2011-05-07 20:25:05 -04:00
parent b10b464070
commit 656b86a685
5 changed files with 63 additions and 7 deletions

View File

@ -28,7 +28,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetClientMgr.h"
#include "plCreatableIndex.h"
#include "plNetObjectDebugger.h"
#include "plNetClientMsgScreener.h"
#include "pnNetCommon/plSynchedObject.h"
#include "pnNetCommon/plSDLTypes.h"
@ -220,8 +219,7 @@ int plNetClientMgr::ISendGameMessage(plMessage* msg)
if (GetFlagsBit(kDisabled))
return hsOK;
static plNetClientMsgScreener screener; // make static so that there's only 1 log per session
if (!screener.AllowMessage(msg))
if (!fScreener.AllowOutgoingMessage(msg))
{
if (GetFlagsBit(kScreenMessages))
return hsOK; // filter out illegal messages