mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 07:10:25 -08:00
Server was using message limit for commands
Server was using getMaxMessageCountPerInterval over getMaxCommandCountPerInterval. Raised command limit from 10 to 20
This commit is contained in:
@@ -234,7 +234,7 @@ Response::ResponseCode Server_ProtocolHandler::processGameCommandContainer(const
|
||||
return Response::RespNotInRoom;
|
||||
|
||||
int commandCountingInterval = server->getCommandCountingInterval();
|
||||
int maxMessageCountPerInterval = server->getMaxMessageCountPerInterval();
|
||||
int maxCommandCountPerInterval = server->getMaxCommandCountPerInterval();
|
||||
GameEventStorage ges;
|
||||
Response::ResponseCode finalResponseCode = Response::RespOk;
|
||||
for (int i = cont.game_command_size() - 1; i >= 0; --i) {
|
||||
@@ -252,7 +252,7 @@ Response::ResponseCode Server_ProtocolHandler::processGameCommandContainer(const
|
||||
for (int i = 0; i < commandCountOverTime.size(); ++i)
|
||||
totalCount += commandCountOverTime[i];
|
||||
|
||||
if (totalCount > maxMessageCountPerInterval)
|
||||
if (totalCount > maxCommandCountPerInterval)
|
||||
return Response::RespChatFlood;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user