try this on for size

This commit is contained in:
DarthArgus
2017-01-03 23:48:56 -06:00
parent b9bda4f1a7
commit 8d999deabc
8 changed files with 353 additions and 306 deletions
@@ -468,10 +468,8 @@ ClientConnection::onIdValidated(bool canLogin, bool canCreateRegularCharacter, b
m_consumedRewardEvents = consumedRewardEvents;
m_claimedRewardItems = claimedRewardItems;
int level = 0;
if (AdminAccountManager::isAdminAccount(Unicode::toLower(getAccountName()), level) && (level !=
0)) // Note: not checking IP, so that owners of god accounts can create characters to play from home without having to erase the characters they use for work
int level = AdminAccountManager::isAdminAccount(getSUID(), ConfigConnectionServer::getUseOldSuidGenerator());
if (level != 0)) // Note: not checking IP, so that owners of god accounts can create characters to play from home without having to erase the characters they use for work
{
canLogin = true;
canCreateRegularCharacter = true;
@@ -1415,8 +1413,8 @@ ClientConnection::onValidateClient(StationId suid, const std::string &username,
LOG("CustomerService",
("AdminLogin: User %s (account %li) attempted to log into account %li, but was not logging in from an internal IP", username.c_str(), suid, m_requestedSuid));
} else {
int adminLevel = 0;
if (!AdminAccountManager::isAdminAccount(Unicode::toLower(username), adminLevel) || adminLevel < 10) {
int adminLevel = AdminAccountManager::isAdminAccount(getSUID(), ConfigConnectionServer::getUseOldSuidGenerator());
if (adminLevel < 10) {
LOG("CustomerService",
("AdminLogin: User %s (account %li) attempted to log into account %li, but did not have sufficient permissions", username.c_str(), suid, m_requestedSuid));
} else {