IW4M-Admin/SharedLibrary/Penalty.cs
RaidMax cdeb7e8eaf Finally stopped the "error on character" printout (removed console.writeline in Kayak submodule)
Fixed console execute button cascading on IE/Edge
Fixed reports truncating reason if space in target name
If multiple matches are found when finding a player, a list of matches is shown
Reallowed special characters in names/chat
stats command player isn't required
Added prune command
2017-11-16 17:09:19 -06:00

58 lines
1.4 KiB
C#

using System;
using SharedLibrary;
namespace SharedLibrary
{
public class Penalty
{
public Penalty(Type BType, String Reas, String TargID, String From, DateTime time, String ip, DateTime exp)
{
Reason = Reas.StripColors();
OffenderID = TargID;
PenaltyOriginID = From;
When = time;
Expires = exp;
IP = ip;
this.BType = BType;
}
public String GetWhenFormatted()
{
return When.ToString("MM/dd/yy HH:mm:ss"); ;
}
public enum Type
{
Report,
Warning,
Flag,
Kick,
TempBan,
Ban,
Any,
}
public String Reason { get; private set; }
public String OffenderID { get; private set; }
public String PenaltyOriginID { get; private set; }
public DateTime When { get; private set; }
public DateTime Expires { get; private set; }
public String IP { get; private set; }
public Type BType { get; private set; }
}
public class Report
{
public Report(Player T, Player O, String R)
{
Target = T;
Origin = O;
Reason = R;
}
public Player Target { get; private set; }
public Player Origin { get; private set; }
public String Reason { get; private set; }
}
}