mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 07:40:54 -05:00
Stats thread safe
Cleaned up WebService class and shutdown reimped stats and topstats moved things out of stats into main code
This commit is contained in:
30
Plugins/SimpleStats/Pages/LiveStats.cs
Normal file
30
Plugins/SimpleStats/Pages/LiveStats.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using SharedLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
public class LiveStats : HTMLPage
|
||||
{
|
||||
public override string GetContent(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
StringBuilder S = new StringBuilder();
|
||||
S.Append(LoadHeader());
|
||||
|
||||
IFile stats = new IFile("webfront\\stats.html");
|
||||
S.Append(stats.GetText());
|
||||
stats.Close();
|
||||
|
||||
S.Append(LoadFooter());
|
||||
|
||||
return S.ToString();
|
||||
}
|
||||
|
||||
public override string GetName() => "Server Stats";
|
||||
public override string GetPath() => "/stats";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user