mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-01-17 00:04:52 -05:00
back to stock
This commit is contained in:
@@ -2230,22 +2230,11 @@ 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();
|
||||
}
|
||||
|
||||
|
||||
if (value && !m_godValidated)
|
||||
{
|
||||
LOG("CustomerService", ("Avatar:%s denied god mode because it wasn't validated.", PlayerObject::getAccountDescription(getCharacterObjectId()).c_str() ));
|
||||
m_godMode = false;
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user