Scripts/Commands: Minor improvements in .pinfo and .unban character commands

Port From (https://github.com/TrinityCore/TrinityCore/commit/7d01ad8b8f7d20769058c642e690847aa51196c6)
This commit is contained in:
hondacrx
2022-06-10 00:26:21 -04:00
parent 36865a41fc
commit 24a8217565
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -619,6 +619,7 @@ namespace Game.Chat.Commands
return false;
}
handler.SendSysMessage(CypherStrings.UnbanUnbanned, name);
return true;
}
+4 -1
View File
@@ -1622,10 +1622,13 @@ namespace Game.Chat
stmt.AddValue(0, lowguid);
result2 = DB.Characters.Query(stmt);
}
else
banType = handler->GetTrinityString(LANG_ACCOUNT);
if (!result2.IsEmpty())
{
banTime = (result2.Read<ulong>(1) != 0 ? 0 : result2.Read<uint>(0));
bool permanent = result2.Read<ulong>(1) != 0;
banTime = !permanent ? result2.Read<uint>(0) : 0;
bannedBy = result2.Read<string>(2);
banReason = result2.Read<string>(3);
}