Server_Room optimisation

This commit is contained in:
Max-Wilhelm Bruker
2013-02-11 15:29:19 +01:00
parent de3055be6a
commit 00029eeeb4
3 changed files with 15 additions and 13 deletions

View File

@@ -552,8 +552,6 @@ Response::ResponseCode Server_ProtocolHandler::cmdCreateGame(const Command_Creat
if (gameId == -1)
return Response::RespInternalError;
QMutexLocker roomLocker(&room->gamesMutex);
if (server->getMaxGamesPerUser() > 0)
if (room->getGamesCreatedByUser(QString::fromStdString(userInfo->name())) >= server->getMaxGamesPerUser())
return Response::RespContextError;