diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 002d85d08..575762c86 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -758,6 +758,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char* args) arg2 = arg1; targetAccountId = targetPlayer->GetSession()->GetAccountId(); + accmgr.GetName(targetAccountId, targetAccountName); } else { @@ -791,7 +792,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char* args) } /// can set security level only for target with less security and to less security that we have - /// This is also reject self apply in fact + /// This will reject self apply by specify account name if(HasLowerSecurityAccount(NULL,targetAccountId,true)) return false; @@ -804,7 +805,8 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char* args) return false; } - if(targetPlayer) + // This will prevent self apply by self target or no target + if(targetPlayer && m_session->GetPlayer()!=targetPlayer) { ChatHandler(targetPlayer).PSendSysMessage(LANG_YOURS_SECURITY_CHANGED,GetNameLink().c_str(), gm); targetPlayer->GetSession()->SetSecurity(gm); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0a90796f7..a003fed5a 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7562" + #define REVISION_NR "7563" #endif // __REVISION_NR_H__