forked from mirror/openmw-tes3mp
[General] Add basic integrity check to ProxyMasterPacket
This commit is contained in:
parent
17af679c07
commit
b0cd636924
1 changed files with 9 additions and 0 deletions
|
@ -29,6 +29,9 @@ namespace mwmp
|
|||
|
||||
packet->RW(rulesSize, send);
|
||||
|
||||
if (rulesSize > 2000)
|
||||
rulesSize = 0;
|
||||
|
||||
map<string, ServerRule>::iterator ruleIt;
|
||||
if (send)
|
||||
ruleIt = server.rules.begin();
|
||||
|
@ -71,6 +74,9 @@ namespace mwmp
|
|||
int playersCount = server.players.size();
|
||||
packet->RW(playersCount, send);
|
||||
|
||||
if (playersCount > 2000)
|
||||
playersCount = 0;
|
||||
|
||||
while (playersCount--)
|
||||
{
|
||||
string player;
|
||||
|
@ -88,6 +94,9 @@ namespace mwmp
|
|||
int pluginsCount = server.plugins.size();
|
||||
packet->RW(pluginsCount, send);
|
||||
|
||||
if (pluginsCount > 2000)
|
||||
pluginsCount = 0;
|
||||
|
||||
vector<Plugin>::iterator pluginIt;
|
||||
|
||||
if (send)
|
||||
|
|
Loading…
Reference in a new issue