[REJECTED]Accepting Whisper On/off Help[REJECTED]

Hello coders, if you could help me with my problem this would be awesome, on my server I got a VIP system but if you do .whisper off as a gamemaster, VIPs are still able to whisper you, because they are a kind of rank 1 on the server. I got the code for the whisper command. I’ve tried some stuff by myself but without luck.


//Enable\Dissable accept whispers (for GM)

bool ChatHandler::HandleWhispersCommand(const char* args)

{

    if (!*args)

    {

	    PSendSysMessage(LANG_COMMAND_WHISPERACCEPTING, m_session->GetPlayer()->isAcceptWhispers() ?  GetTrinityString(LANG_ON) : GetTrinityString(LANG_OFF));

	    return true;

    }

    std::string argstr = (char*)args;

    // whisper on

    if (argstr == "on")

    {

	    m_session->GetPlayer()->SetAcceptWhispers(true);

	    SendSysMessage(LANG_COMMAND_WHISPERON);

	    return true;

    }

    // whisper off

    if (argstr == "off")

    {

	    m_session->GetPlayer()->ClearWhisperWhiteList();

	    m_session->GetPlayer()->SetAcceptWhispers(false);

	    SendSysMessage(LANG_COMMAND_WHISPEROFF);

	    return true;

    }

    SendSysMessage(LANG_USE_BOL);

    SetSentErrorMessage(true);

    return false;

}

VIP System? Better go looking for help somewhere else!