Core/Players: Implemented serverside validation of reserved/profane names

Closes #15357

New library dependency: Boost.Regex

(cherry picked from commit b564c10b13effed63c7b7dae25117e2e0a2c64e4)
This commit is contained in:
Shauren committed 2015-10-31 17:27:45 +01:00
1 parent 60da7c6552
commit 1de03cf107
13 files changed
+103 -18

No files matched your search

@@ -363,7 +363,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
}
// check name limitations
ResponseCodes res = ObjectMgr::CheckPlayerName(createInfo.Name, true);
ResponseCodes res = ObjectMgr::CheckPlayerName(createInfo.Name, GetSessionDbcLocale(), true);
if (res != CHAR_NAME_SUCCESS)
{
SendCharCreate(res);
@@ -1095,7 +1095,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recvData)
return;
}
ResponseCodes res = ObjectMgr::CheckPlayerName(renameInfo.Name, true);
ResponseCodes res = ObjectMgr::CheckPlayerName(renameInfo.Name, GetSessionDbcLocale(), true);
if (res != CHAR_NAME_SUCCESS)
{
SendCharRename(res, renameInfo);
@@ -1394,7 +1394,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
return;
}
ResponseCodes res = ObjectMgr::CheckPlayerName(customizeInfo.Name, true);
ResponseCodes res = ObjectMgr::CheckPlayerName(customizeInfo.Name, GetSessionDbcLocale(), true);
if (res != CHAR_NAME_SUCCESS)
{
SendCharCustomize(res, customizeInfo);
@@ -1652,7 +1652,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
return;
}
ResponseCodes res = ObjectMgr::CheckPlayerName(factionChangeInfo.Name, true);
ResponseCodes res = ObjectMgr::CheckPlayerName(factionChangeInfo.Name, GetSessionDbcLocale(), true);
if (res != CHAR_NAME_SUCCESS)
{
SendCharFactionChange(res, factionChangeInfo);