fix(Core/Misc): few improvements to ut8 handling (#2455)

This commit is contained in:
Viste
2019-12-02 10:33:44 +03:00
committed by Stoabrogga
parent ad320ec9d9
commit ec808793ae
11 changed files with 200 additions and 94 deletions

View File

@@ -147,7 +147,7 @@ public:
return false;
std::string accountName = account;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
@@ -419,7 +419,7 @@ public:
{
///- Convert Account name to Upper Format
accountName = account;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
@@ -485,7 +485,7 @@ public:
if (isAccountNameGiven)
{
targetAccountName = arg1;
if (!AccountMgr::normalizeString(targetAccountName))
if (!Utf8ToUpperOnlyLatin(targetAccountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str());
handler->SetSentErrorMessage(true);
@@ -597,7 +597,7 @@ public:
return false;
std::string accountName = account;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);

View File

@@ -166,7 +166,7 @@ public:
switch (mode)
{
case BAN_ACCOUNT:
if (!AccountMgr::normalizeString(nameOrIP))
if (!Utf8ToUpperOnlyLatin(nameOrIP))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
handler->SetSentErrorMessage(true);
@@ -253,7 +253,7 @@ public:
return false;
std::string accountName = nameStr;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
@@ -713,7 +713,7 @@ public:
switch (mode)
{
case BAN_ACCOUNT:
if (!AccountMgr::normalizeString(nameOrIP))
if (!Utf8ToUpperOnlyLatin(nameOrIP))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
handler->SetSentErrorMessage(true);

View File

@@ -764,7 +764,7 @@ public:
return false;
std::string accountName = accountStr;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);

View File

@@ -1296,7 +1296,7 @@ public:
char* limitStr = strtok(nullptr, " ");
int32 limit = limitStr ? atoi(limitStr) : -1;
if (!AccountMgr::normalizeString
if (!Utf8ToUpperOnlyLatin
(account))
return false;

View File

@@ -2330,7 +2330,7 @@ public:
return false;
std::string accountName = nameStr;
if (!AccountMgr::normalizeString(accountName))
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);