aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp2
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index c8510f7fc03..11238850958 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -448,7 +448,7 @@ public:
}
// Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1
- if (gmRealmID == -1 && plSecurity != SEC_CONSOLE)
+ if (gmRealmID == -1 && !AccountMgr::IsConsoleAccount(plSecurity))
{
QueryResult result = LoginDatabase.PQuery("SELECT * FROM account_access WHERE id = '%u' AND gmlevel > '%d'", targetAccountId, gm);
if (result)
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index a520eac1ee7..45e8dcd5eb5 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
+#include "AccountMgr.h"
class gm_commandscript : public CommandScript
{
@@ -56,10 +57,11 @@ public:
{
if (!*args)
{
- if (handler->GetSession()->GetPlayer()->isGMChat())
- handler->GetSession()->SendNotification(LANG_GM_CHAT_ON);
+ WorldSession* session = handler->GetSession();
+ if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->isGMChat())
+ session->SendNotification(LANG_GM_CHAT_ON);
else
- handler->GetSession()->SendNotification(LANG_GM_CHAT_OFF);
+ session->SendNotification(LANG_GM_CHAT_OFF);
return true;
}
@@ -120,7 +122,7 @@ public:
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
- if ((itr->second->isGameMaster() || (itr_sec > SEC_PLAYER && itr_sec <= AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
+ if ((itr->second->isGameMaster() || !AccountMgr::IsPlayerAccount((itr_sec) && itr_sec <= AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
(!handler->GetSession() || itr->second->IsVisibleGloballyFor(handler->GetSession()->GetPlayer())))
{
if (first)