using config.xml values for limitrank

This commit is contained in:
Kai Philipp
2019-09-15 17:29:09 +02:00
parent bbd05513fd
commit b3117f3046
3 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -271,7 +271,7 @@ PlayerData::GetPlayerLastGames()
}
bool
PlayerData::IsPlayerAllowedToJoinCreateLimitRank()
PlayerData::IsPlayerAllowedToJoinCreateLimitRank(int num, int period)
{
bool retVal = false;
LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
@@ -280,7 +280,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
boost::mutex::scoped_lock lock(m_dataMutex);
long then = (long)time(NULL) - (long)(SERVER_ALLOWED_RANKING_GAMES_MINUTES * 10);
long then = (long)time(NULL) - (long)(period * 10);
int count = 0;
int i=0;
@@ -298,7 +298,7 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
i++;
}
if(count < SERVER_ALLOWED_RANKING_GAMES_PER_MINUTES)
if(count < num)
retVal = true;
return retVal;