Core: add some missing Player Name normalization on input data
Port From (https://github.com/TrinityCore/TrinityCore/commit/b742c872223950dfae14468b0e7a304a3e660e76)
This commit is contained in:
@@ -213,6 +213,12 @@ namespace Game.Chat.Commands
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
string name = args.NextString();
|
string name = args.NextString();
|
||||||
|
if (!ObjectManager.NormalizePlayerName(ref name))
|
||||||
|
{
|
||||||
|
handler.SendSysMessage(CypherStrings.BaninfoNocharacter);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Player target = Global.ObjAccessor.FindPlayerByName(name);
|
Player target = Global.ObjAccessor.FindPlayerByName(name);
|
||||||
ObjectGuid targetGuid;
|
ObjectGuid targetGuid;
|
||||||
|
|
||||||
|
|||||||
@@ -241,6 +241,9 @@ namespace Game
|
|||||||
Team inviteeTeam = 0;
|
Team inviteeTeam = 0;
|
||||||
ulong inviteeGuildId = 0;
|
ulong inviteeGuildId = 0;
|
||||||
|
|
||||||
|
if (!ObjectManager.NormalizePlayerName(ref calendarEventInvite.Name))
|
||||||
|
return;
|
||||||
|
|
||||||
Player player = Global.ObjAccessor.FindPlayerByName(calendarEventInvite.Name);
|
Player player = Global.ObjAccessor.FindPlayerByName(calendarEventInvite.Name);
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user