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:
Nefarion
2013-03-09 22:34:42 +01:00
parent 9ae9277817
commit 46ba2d945a
6 changed files with 36 additions and 14 deletions

View File

@@ -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;