2015-08-20 01:06:44 -04:00
|
|
|
|
using System;
|
2017-06-12 17:47:31 -04:00
|
|
|
|
using SharedLibrary;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
|
|
|
|
|
namespace SharedLibrary
|
|
|
|
|
{
|
2016-01-15 17:15:39 -05:00
|
|
|
|
public class Penalty
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-08-23 18:29:48 -04:00
|
|
|
|
public Penalty(Type BType, String Reas, String TargID, String From, DateTime time, String ip, DateTime exp)
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
2017-06-12 17:47:31 -04:00
|
|
|
|
Reason = Reas.CleanChars().StripColors();
|
2017-05-31 01:31:56 -04:00
|
|
|
|
OffenderID = TargID;
|
|
|
|
|
PenaltyOriginID = From;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
When = time;
|
2017-08-23 18:29:48 -04:00
|
|
|
|
Expires = exp;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
IP = ip;
|
2016-01-15 17:15:39 -05:00
|
|
|
|
this.BType = BType;
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
|
|
|
|
|
2017-06-07 17:08:29 -04:00
|
|
|
|
public String GetWhenFormatted()
|
2015-08-20 01:06:44 -04:00
|
|
|
|
{
|
|
|
|
|
return When.ToString("MM/dd/yy HH:mm:ss"); ;
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-15 17:15:39 -05:00
|
|
|
|
public enum Type
|
|
|
|
|
{
|
2017-05-31 01:31:56 -04:00
|
|
|
|
Report,
|
2016-01-16 17:58:24 -05:00
|
|
|
|
Warning,
|
2017-05-31 01:31:56 -04:00
|
|
|
|
Flag,
|
2016-01-15 17:15:39 -05:00
|
|
|
|
Kick,
|
|
|
|
|
TempBan,
|
|
|
|
|
Ban
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-20 01:06:44 -04:00
|
|
|
|
public String Reason { get; private set; }
|
2017-05-31 01:31:56 -04:00
|
|
|
|
public String OffenderID { get; private set; }
|
|
|
|
|
public String PenaltyOriginID { get; private set; }
|
2015-08-20 01:06:44 -04:00
|
|
|
|
public DateTime When { get; private set; }
|
2017-08-23 18:29:48 -04:00
|
|
|
|
public DateTime Expires { get; private set; }
|
2015-08-20 01:06:44 -04:00
|
|
|
|
public String IP { get; private set; }
|
2016-01-15 17:15:39 -05:00
|
|
|
|
public Type BType { get; private set; }
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|
2017-06-12 17:47:31 -04:00
|
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
}
|
2015-08-20 01:06:44 -04:00
|
|
|
|
}
|