diff --git a/common/server_protocolhandler.cpp b/common/server_protocolhandler.cpp index d2ffd3d4..46d79139 100644 --- a/common/server_protocolhandler.cpp +++ b/common/server_protocolhandler.cpp @@ -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; } diff --git a/servatrice/src/servatrice.cpp b/servatrice/src/servatrice.cpp index 2e730a22..5a566f6e 100644 --- a/servatrice/src/servatrice.cpp +++ b/servatrice/src/servatrice.cpp @@ -260,7 +260,7 @@ bool Servatrice::initServer() maxMessageSizePerInterval = settingsCache->value("security/max_message_size_per_interval", 1000).toInt(); maxGamesPerUser = settingsCache->value("security/max_games_per_user", 5).toInt(); commandCountingInterval = settingsCache->value("game/command_counting_interval", 10).toInt(); - maxCommandCountPerInterval = settingsCache->value("game/max_command_count_per_interval", 10).toInt(); + maxCommandCountPerInterval = settingsCache->value("game/max_command_count_per_interval", 20).toInt(); try { if (settingsCache->value("servernetwork/active", 0).toInt()) { qDebug() << "Connecting to ISL network.";