quiet some annoying warnings; make godmode behave as it did originally

This commit is contained in:
CodeCodon
2015-07-24 15:44:23 -05:00
parent cda239d06a
commit 34734c8879
4 changed files with 11 additions and 2 deletions
@@ -242,7 +242,10 @@ Client::Client(ConnectionServerConnection & connection, const NetworkId & charac
connectToEmitter(connection, "ConnectionServerConnectionDestroyed");
// Check god permissions
if (AdminAccountManager::isAdminAccount(Unicode::toLower(accountName), m_godLevel))
if ( ConfigServerGame::getAdminGodToAll()
|| ( (!ConfigServerGame::getUseSecureLoginForGodAccess() || m_isSecure)
&& AdminAccountManager::isAdminAccount(Unicode::toLower(accountName), m_godLevel)
&& (!ConfigServerGame::getUseIPForGodAccess() || AdminAccountManager::isInternalIp(ipAddr))))
{
m_godValidated = true;
if (ConfigServerGame::getAdminGodToAll())
@@ -67,7 +67,7 @@ void ConfigServerGame::install(void)
KEY_BOOL (profileScripts, false);
KEY_BOOL (crashOnScriptError, false);
KEY_BOOL (compileScripts, true);
KEY_BOOL (trapScriptCrashes, false);
KEY_BOOL (trapScriptCrashes, true);
KEY_INT (scriptWatcherWarnTime, 5000);
KEY_INT (scriptWatcherInterruptTime, 5000);
KEY_INT (scriptStackErrorLimit, 35);
@@ -21,9 +21,12 @@ namespace NAMESPACE
namespace Base
{
#ifndef INT32_MAX
#define INT32_MAX 0x7FFFFFFF
#define INT32_MIN 0x80000000
#define UINT32_MAX 0xFFFFFFFF
#endif
typedef signed char int8;
typedef unsigned char uint8;
@@ -21,9 +21,12 @@ namespace NAMESPACE
namespace Base
{
#ifndef INT32_MAX
#define INT32_MAX 0x7FFFFFFF
#define INT32_MIN 0x80000000
#define UINT32_MAX 0xFFFFFFFF
#endif
typedef signed char int8;
typedef unsigned char uint8;