Add ban ticket ID to ban messages
This commit is contained in:
parent
c72e64fa5e
commit
e80f0bfda5
2 changed files with 3 additions and 3 deletions
|
|
@ -1522,7 +1522,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
if (banResult?.Ban != null)
|
if (banResult?.Ban != null)
|
||||||
{
|
{
|
||||||
player.Disconnect($"You have been banned: {banResult.Ban.Reason}.");
|
player.Disconnect($"#{banResult.Ban.TicketNumber} - You have been banned: {banResult.Ban.Reason}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,12 +205,12 @@ namespace TShockAPI.DB
|
||||||
{
|
{
|
||||||
if (ban.ExpirationDateTime == DateTime.MaxValue)
|
if (ban.ExpirationDateTime == DateTime.MaxValue)
|
||||||
{
|
{
|
||||||
player.Disconnect("You are banned: " + ban.Reason);
|
player.Disconnect($"#{ban.TicketNumber} - You are banned: {ban.Reason}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeSpan ts = ban.ExpirationDateTime - DateTime.UtcNow;
|
TimeSpan ts = ban.ExpirationDateTime - DateTime.UtcNow;
|
||||||
player.Disconnect($"You are banned: {ban.Reason} ({ban.GetPrettyExpirationString()} remaining)");
|
player.Disconnect($"#{ban.TicketNumber} - You are banned: {ban.Reason} ({ban.GetPrettyExpirationString()} remaining)");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue