mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ChannelMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
class message_commandscript : public CommandScript
|
||||
{
|
||||
@@ -186,7 +187,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string argStr = (char*)args;
|
||||
std::string argStr = strtok((char*)args, " ");
|
||||
// whisper on
|
||||
if (argStr == "on")
|
||||
{
|
||||
@@ -205,6 +206,23 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argStr == "remove")
|
||||
{
|
||||
std::string name = strtok(NULL, " ");
|
||||
if (normalizePlayerName(name))
|
||||
if (Player* player = sObjectAccessor->FindPlayerByName(name))
|
||||
{
|
||||
handler->GetSession()->GetPlayer()->RemoveFromWhisperWhiteList(player->GetGUID());
|
||||
handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, name);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PLAYER_NOT_FOUND, name);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
handler->SendSysMessage(LANG_USE_BOL);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user