[6842] More correct guid/name arg processing in .pdump write command, reject early wrong player name in HandleWhoisOpcode.

This commit is contained in:
VladimirMangos 2008-11-23 11:33:07 +03:00
parent 809bd7392f
commit 2da935ecc4
4 changed files with 29 additions and 7 deletions

View file

@ -1255,14 +1255,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
if(charname.empty())
if(charname.empty() || !normalizePlayerName (charname))
{
SendNotification(LANG_NEED_CHARACTER_NAME);
return;
}
normalizePlayerName (charname);
Player *plr = objmgr.GetPlayer(charname.c_str());
if(!plr)