IW4M-Admin/SharedLibrary/Penalty.cs
RaidMax 9227335d25 -removes flag penality when unflagging a player
-fixed 'just now ago' on webfront
-webfront playerlist level colors are hidden to non admin users
-tempban length can now be specified (<int>m, <int>h, <int>d,  <int>y)
2017-08-23 17:29:48 -05:00

57 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.CleanChars().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
}
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; }
}
}