1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

-added back player history graphs (past 12 hours every 15 minutes)

-fixed issue with configurationmanager files and threading
-servers on webfront listed in descending player count
-fixed resolution of tempban times from console feedback
-Added tests plugin to simulate functionality
This commit is contained in:
RaidMax
2017-09-27 15:07:43 -05:00
parent 9227335d25
commit 8d52d7ddc5
21 changed files with 470 additions and 127 deletions

View File

@ -4,12 +4,45 @@ namespace SharedLibrary.Helpers
{
public class PlayerHistory
{
public PlayerHistory(DateTime w, int cNum)
public PlayerHistory(int cNum)
{
When = w;
Players = cNum;
DateTime t = DateTime.UtcNow;
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, 5 * (int)Math.Round(t.Minute / 5.0), 0);
PlayerCount = cNum;
}
#if DEBUG
public PlayerHistory(DateTime t, int cNum)
{
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, 15 * (int)Math.Round(t.Minute / 15.0), 0);
PlayerCount = cNum;
}
#endif
private DateTime When;
private int PlayerCount;
/// <summary>
/// Used by CanvasJS as a point on the x axis
/// </summary>
public double x
{
get
{
return (When - DateTime.MinValue).TotalSeconds;
}
}
/// <summary>
/// Used by CanvasJS as a point on the y axis
/// </summary>
public int y
{
get
{
return PlayerCount;
}
}
public DateTime When { get; private set; }
public int Players { get; private set; }
}
}