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

+2 -2
View File
@@ -335,7 +335,7 @@ public:
return false;
}
if (ObjectMgr::CheckPlayerName(newName, true) != CHAR_NAME_SUCCESS)
if (ObjectMgr::CheckPlayerName(newName, target ? target->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale(), true) != CHAR_NAME_SUCCESS)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
@@ -895,7 +895,7 @@ public:
return false;
}
if (ObjectMgr::CheckPlayerName(name, true) != CHAR_NAME_SUCCESS)
if (ObjectMgr::CheckPlayerName(name, sWorld->GetDefaultDbcLocale(), true) != CHAR_NAME_SUCCESS)
{
handler->PSendSysMessage(LANG_INVALID_CHARACTER_NAME);
handler->SetSentErrorMessage(true);