mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-01-17 00:04:52 -05:00
Revert "remove a check that was malfunctioning"
This reverts commit 6aae26ed4bbfbabb95d236f38052edaf176da7b8.
This commit is contained in:
@@ -2229,13 +2229,24 @@ bool Client::setGodMode(bool value)
|
||||
{
|
||||
bool wasInGodMode = m_godMode;
|
||||
m_godMode = value;
|
||||
|
||||
// Check god permissions
|
||||
// the check above seems not to work
|
||||
if (ConfigServerGame::getAdminGodToAll()
|
||||
|| ((!ConfigServerGame::getUseSecureLoginForGodAccess() || m_isSecure)
|
||||
&& AdminAccountManager::isAdminAccount(Unicode::toLower(m_accountName), m_godLevel)
|
||||
&& (!ConfigServerGame::getUseIPForGodAccess() || AdminAccountManager::isInternalIp(m_ipAddress))))
|
||||
{
|
||||
m_godValidated = true;
|
||||
if (ConfigServerGame::getAdminGodToAll())
|
||||
m_godLevel = ConfigServerGame::getAdminGodToAllGodLevel();
|
||||
}
|
||||
|
||||
// wtf, the checks above do nothing
|
||||
/*if (value && !m_godValidated)
|
||||
if (value && !m_godValidated)
|
||||
{
|
||||
LOG("CustomerService", ("Avatar:%s denied god mode because it wasn't validated.", PlayerObject::getAccountDescription(getCharacterObjectId()).c_str() ));
|
||||
m_godMode = false;
|
||||
}*/
|
||||
}
|
||||
|
||||
CreatureObject *primaryControlledObject = safe_cast<CreatureObject*>(m_primaryControlledObject.getObject());
|
||||
if (!primaryControlledObject)
|
||||
|
||||
Reference in New Issue
Block a user