mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 15:52:25 -05:00
more plugin tweaks, added console interface!
This commit is contained in:
@ -367,6 +367,25 @@ namespace Webfront_Plugin
|
||||
return Input.Replace(Macro, buffer.ToString());
|
||||
}
|
||||
|
||||
if (Looking == "GRAPH")
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.Append("<script type='text/javascript' src='//www.google.com/jsapi'></script><div id='chart_div'></div>");
|
||||
buffer.Append("<script> var players = [");
|
||||
int count = 1;
|
||||
List<PlayerHistory> run = Servers[0].playerHistory.ToList();
|
||||
foreach (PlayerHistory i in run) //need to reverse for proper timeline
|
||||
{
|
||||
buffer.AppendFormat("[new Date({0}, {1}, {2}, {3}, {4}), {5}]", i.When.Year, i.When.Month - 1, i.When.Day, i.When.Hour, i.When.Minute, i.Players);
|
||||
if (count < run.Count)
|
||||
buffer.Append(",\n");
|
||||
count++;
|
||||
}
|
||||
buffer.Append("];\n");
|
||||
buffer.Append("</script>");
|
||||
return Input.Replace(Macro, buffer.ToString());
|
||||
}
|
||||
|
||||
if (Looking == "TITLE")
|
||||
return Input.Replace(Macro, "IW4MAdmin by RaidMax");
|
||||
|
||||
@ -399,7 +418,7 @@ namespace Webfront_Plugin
|
||||
break;
|
||||
case "graph":
|
||||
requestedPage = new graph();
|
||||
break;
|
||||
return processTemplate(requestedPage.Load(), request.QueryString);
|
||||
case "stats":
|
||||
requestedPage = new stats();
|
||||
break;
|
||||
|
@ -4,7 +4,7 @@ using System.Threading;
|
||||
|
||||
namespace Webfront_Plugin
|
||||
{
|
||||
public class Webfront : Notify
|
||||
public class Webfront : Plugin
|
||||
{
|
||||
private static Manager webManager;
|
||||
|
||||
@ -33,5 +33,15 @@ namespace Webfront_Plugin
|
||||
|
||||
webManagerThread.Start();
|
||||
}
|
||||
|
||||
public override String Name
|
||||
{
|
||||
get { return "Webfront"; }
|
||||
}
|
||||
|
||||
public override float Version
|
||||
{
|
||||
get { return 0.1f; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)Admin\plugins\$(TargetName).dll"</PostBuildEvent>
|
||||
<PostBuildEvent>copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)Admin\plugins\WebfrontPlugin.dll"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
Reference in New Issue
Block a user