mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
[General] Add basic integrity check to ProxyMasterPacket
This commit is contained in:
parent
17af679c07
commit
b0cd636924
@ -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…
x
Reference in New Issue
Block a user