From 24a82175658af43fcba34c4593c2d0a23806860e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 10 Jun 2022 00:26:21 -0400 Subject: [PATCH] Scripts/Commands: Minor improvements in .pinfo and .unban character commands Port From (https://github.com/TrinityCore/TrinityCore/commit/7d01ad8b8f7d20769058c642e690847aa51196c6) --- Source/Game/Chat/Commands/BanCommands.cs | 1 + Source/Game/Chat/Commands/MiscCommands.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Game/Chat/Commands/BanCommands.cs b/Source/Game/Chat/Commands/BanCommands.cs index a4ca343a3..fc29c35c8 100644 --- a/Source/Game/Chat/Commands/BanCommands.cs +++ b/Source/Game/Chat/Commands/BanCommands.cs @@ -619,6 +619,7 @@ namespace Game.Chat.Commands return false; } + handler.SendSysMessage(CypherStrings.UnbanUnbanned, name); return true; } diff --git a/Source/Game/Chat/Commands/MiscCommands.cs b/Source/Game/Chat/Commands/MiscCommands.cs index 221d4cf2c..de53178ac 100644 --- a/Source/Game/Chat/Commands/MiscCommands.cs +++ b/Source/Game/Chat/Commands/MiscCommands.cs @@ -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(1) != 0 ? 0 : result2.Read(0)); + bool permanent = result2.Read(1) != 0; + banTime = !permanent ? result2.Read(0) : 0; bannedBy = result2.Read(2); banReason = result2.Read(3); }