Allow reply to whispers if you are under CONFIG_CHAT_WHISPER_LEVEL_REQ, and implement feature for GMs to remove single players from their WhisperWhiteList.
This commit is contained in:
1 parent
9ae9277817
commit
46ba2d945a
6 files changed
+36
-14
No files matched your search
@@ -186,7 +186,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string argStr = (char*)args;
|
||||
std::string argStr = strtok((char*)args, " ");
|
||||
// whisper on
|
||||
if (argStr == "on")
|
||||
{
|
||||
@@ -205,6 +205,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