Scripts/Commands: Minor improvements in .pinfo and .unban character commands
Port From (https://github.com/TrinityCore/TrinityCore/commit/7d01ad8b8f7d20769058c642e690847aa51196c6)
This commit is contained in:
@@ -619,6 +619,7 @@ namespace Game.Chat.Commands
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler.SendSysMessage(CypherStrings.UnbanUnbanned, name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1622,10 +1622,13 @@ namespace Game.Chat
|
|||||||
stmt.AddValue(0, lowguid);
|
stmt.AddValue(0, lowguid);
|
||||||
result2 = DB.Characters.Query(stmt);
|
result2 = DB.Characters.Query(stmt);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
banType = handler->GetTrinityString(LANG_ACCOUNT);
|
||||||
|
|
||||||
if (!result2.IsEmpty())
|
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);
|
bannedBy = result2.Read<string>(2);
|
||||||
banReason = result2.Read<string>(3);
|
banReason = result2.Read<string>(3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user