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

-reconfigured solution and projects to be correct debug/release and files copy properly

-started working on more advanced statistics
This commit is contained in:
RaidMax
2017-09-29 21:42:24 -05:00
parent 8d52d7ddc5
commit 4cddefd542
26 changed files with 1824 additions and 334 deletions

View File

@ -219,7 +219,7 @@ namespace SharedLibrary.Commands
{
int count = 0;
StringBuilder helpResponse = new StringBuilder();
List<Command> CommandList = E.Owner.Manager.GetCommands();
var CommandList = E.Owner.Manager.GetCommands();
foreach (Command C in CommandList)
{

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@ -68,8 +69,6 @@ namespace SharedLibrary
Connect,
Disconnect,
Say,
Kill,
Death,
MapChange,
MapEnd,
@ -83,7 +82,12 @@ namespace SharedLibrary
//FROM PLAYER
Report,
Flag
Flag,
// FROM GAME
Script,
Kill,
Death,
}
public Event(GType t, string d, Player O, Player T, Server S)
@ -101,10 +105,9 @@ namespace SharedLibrary
try
#endif
{
String eventType = line[0].Substring(line[0].Length - 1);
eventType = eventType.Trim();
string removeTime = Regex.Replace(line[0], @"[0-9]+:[0-9]+\ ", "");
if (eventType == "K")
if (removeTime[0] == 'K')
{
StringBuilder Data = new StringBuilder();
if (line.Length > 9)
@ -113,7 +116,7 @@ namespace SharedLibrary
Data.Append(line[i] + ";");
}
return new Event(GType.Kill, Data.ToString(), SV.ParseClientFromString(line, 6), SV.ParseClientFromString(line, 2), SV);
return new Event(GType.Script, Data.ToString(), SV.ParseClientFromString(line, 6), SV.ParseClientFromString(line, 2), SV);
}
if (line[0].Substring(line[0].Length - 3).Trim() == "say")
@ -123,10 +126,15 @@ namespace SharedLibrary
return new Event(GType.Say, Utilities.StripIllegalCharacters(message).StripColors(), SV.ParseClientFromString(line, 2), null, SV) { Message = Utilities.StripIllegalCharacters(message).StripColors() };
}
if (eventType == ":")
if (removeTime.Contains("ScriptKill"))
{
return new Event(GType.Script, String.Join(";", line), SV.Players.FirstOrDefault(p => p != null && p.NetworkID == line[1]), SV.Players.FirstOrDefault(p => p != null && p.NetworkID == line[2]), SV);
}
if (removeTime.Contains("ExitLevel"))
return new Event(GType.MapEnd, line[0], new Player("WORLD", "WORLD", 0, 0), null, SV);
if (line[0].Contains("InitGame"))
if (removeTime.Contains("InitGame"))
return new Event(GType.MapChange, line[0], new Player("WORLD", "WORLD", 0, 0), null, SV);

View File

@ -14,7 +14,7 @@ namespace SharedLibrary.Helpers
#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);
When = new DateTime(t.Year, t.Month, t.Day, t.Hour, Math.Min(59, 15 * (int)Math.Round(t.Minute / 15.0)), 0);
PlayerCount = cNum;
}
#endif

View File

@ -8,8 +8,8 @@ namespace SharedLibrary.Interfaces
void Start();
void Stop();
ILogger GetLogger();
List<Server> GetServers();
List<Command> GetCommands();
IList<Server> GetServers();
IList<Command> GetCommands();
IPenaltyList GetClientPenalties();
ClientsDB GetClientDatabase();
AliasesDB GetAliasesDatabase();

View File

@ -24,9 +24,9 @@ namespace SharedLibrary.Plugins
ICollection<Assembly> assemblies = new List<Assembly>(dllFileNames.Length);
foreach (string dllFile in dllFileNames)
{
byte[] rawDLL = File.ReadAllBytes(dllFile);
Assembly assembly = Assembly.Load(rawDLL);
assemblies.Add(assembly);
// byte[] rawDLL = File.ReadAllBytes(dllFile);
//Assembly assembly = Assembly.Load(rawDLL);
assemblies.Add(Assembly.LoadFrom(dllFile));
}
int LoadedPlugins = 0;

View File

@ -27,7 +27,7 @@
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>..\..\..\RuleSet1.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Nightly|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
@ -50,6 +50,21 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Nightly|x86' ">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Stable|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release-Stable\</OutputPath>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -113,7 +128,6 @@ copy /Y "$(TargetDir)SQLite.Interop.dll" "$(SolutionDir)BUILD\lib"
copy /Y "$(TargetDir)System.Data.SQLite.dll" "$(SolutionDir)BUILD\lib"
copy /Y "$(TargetDir)SQLite.Interop.dll" "$(SolutionDir)Admin\lib"
copy /Y "$(TargetDir)System.Data.SQLite.dll" "$(SolutionDir)Admin\lib"
mkdir "$(SolutionDir)Admin\$(OutDir)plugins
copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\lib"
copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)Admin\lib"
copy /Y "$(TargetDir)Newtonsoft.Json.dll" "$(SolutionDir)BUILD\lib"

View File

@ -7,7 +7,7 @@ namespace SharedLibrary
{
public class WebService
{
public static List<IPage> PageList { get; private set; }
public static List<IPage> PageList { get; set; }
public static void Init()
{