fix(Core/Misc): few improvements to ut8 handling (#2455)
This commit is contained in:
parent
ad320ec9d9
commit
ec808793ae
11 changed files with 200 additions and 94 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1296,7 +1296,7 @@ public:
|
|||
char* limitStr = strtok(nullptr, " ");
|
||||
int32 limit = limitStr ? atoi(limitStr) : -1;
|
||||
|
||||
if (!AccountMgr::normalizeString
|
||||
if (!Utf8ToUpperOnlyLatin
|
||||
(account))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue