limitrank - draft with return false always

This commit is contained in:
Kai Philipp
2019-09-09 19:21:15 +02:00
parent add886ebee
commit e18e459434
5 changed files with 70 additions and 3 deletions
+39
View File
@@ -34,9 +34,13 @@
#include <net/serverexception.h>
#include <net/socket_msg.h>
#include <ctime>
using namespace std;
#define SERVER_MAX_GUEST_USERS_LOBBY 50 // LG: Maximum number of guests users in lobby allowed
#define SERVER_ALLOWED_RANKING_GAMES_PER_MINUTES 5
#define SERVER_ALLOWED_RANKING_GAMES_MINUTES 60
SessionManager::SessionManager()
{
@@ -229,6 +233,41 @@ SessionManager::IsPlayerConnected(unsigned uniqueId) const
return retVal;
}
bool
SessionManager::IsPlayerAllowedToJoinLimitRank(const string &playerName) const
{
bool retVal = false;
// boost::shared_ptr<SessionData> tmpSession = GetSessionByPlayerName(playerName);
// if (tmpSession){
// std::array<std::time_t> lastGames = tmpSession->GetPlayerLastGames();
// std::time_t now = std::time(nullptr);
// retVal = true;
// }
return retVal;
}
bool
SessionManager::IsPlayerAllowedToJoinLimitRank(unsigned uniqueId) const
{
bool retVal = false;
// boost::shared_ptr<SessionData> tmpSession = GetSessionByUniquePlayerId(uniqueId);
// if (tmpSession){
// std::array<std::time_t> lastGames = tmpSession->GetPlayerLastGames();
// std::time_t now = std::time(nullptr);
// retVal = true;
// }
return retVal;
}
bool
SessionManager::IsClientAddressConnected(const std::string &clientAddress) const
{