diff --git a/Admin/Application.csproj b/Admin/Application.csproj
index 6790dae9..b87ac437 100644
--- a/Admin/Application.csproj
+++ b/Admin/Application.csproj
@@ -351,7 +351,8 @@
- copy /Y "$(SolutionDir)lib\*.dll" "$(TargetDir)lib"
+ xcopy /E "$(SolutionDir)lib" "$(TargetDir)lib"
+copy /Y "$(SolutionDir)_customcallbacks.gsc" "$(SolutionDir)BUILD\userraw\scripts\_customcallbacks.gsc"
copy /Y "$(TargetDir)$(TargetName).exe" "$(SolutionDir)BUILD"
copy /Y "$(TargetDir)IW4MAdmin.exe.config" "$(SolutionDir)BUILD"
diff --git a/Admin/Kayak.cs b/Admin/Kayak.cs
index 17116a83..6fcd9071 100644
--- a/Admin/Kayak.cs
+++ b/Admin/Kayak.cs
@@ -15,7 +15,7 @@ namespace IW4MAdmin
{
// it looks like there's a library error in
// Kayak.Http.HttpServerTransactionDelegate.OnError
- if (e.GetType() == typeof(NullReferenceException))
+ if ((uint)e.HResult ==0x80004003)
return;
ApplicationManager.GetInstance().Logger.WriteWarning("Web service has encountered an error - " + e.Message);
diff --git a/Admin/Server.cs b/Admin/Server.cs
index d2a6cdd0..94bf2956 100644
--- a/Admin/Server.cs
+++ b/Admin/Server.cs
@@ -360,9 +360,9 @@ namespace IW4MAdmin
tickTime = DateTime.Now;
}
- if ((lastCount - playerCountStart).TotalMinutes >= 15)
+ if ((lastCount - playerCountStart).TotalMinutes >= SharedLibrary.Helpers.PlayerHistory.UpdateInterval)
{
- while (PlayerHistory.Count > 48) // 4 times a hour for 12 hours
+ while (PlayerHistory.Count > ((60 / SharedLibrary.Helpers.PlayerHistory.UpdateInterval) * 12 )) // 12 times a hour for 12 hours
PlayerHistory.Dequeue();
PlayerHistory.Enqueue(new SharedLibrary.Helpers.PlayerHistory(ClientNum));
playerCountStart = DateTime.Now;
@@ -492,18 +492,15 @@ namespace IW4MAdmin
await this.ExecuteCommandAsync("map_restart");
logfile = await this.GetDvarAsync("g_log");
}
+
+ CustomCallback = await ScriptLoaded();
#if DEBUG
- //if (Environment.OSVersion.VersionString != "Microsoft Windows NT 6.2.9200.0")
{
basepath.Value = (GameName == Game.IW4) ?
@"\\tsclient\J\WIN7_10.25\MW2" :
@"\\tsclient\G\Program Files (x86)\Steam\SteamApps\common\Call of Duty 4";
}
- // else
- // {
- // basepath.Value = @"C:\MW2";
- // }
#endif
string mainPath = (GameName == Game.IW4) ? "userraw" : "main";
diff --git a/Admin/lib/SharedLibrary.dll b/Admin/lib/SharedLibrary.dll
index 4c8d144c..46224361 100644
Binary files a/Admin/lib/SharedLibrary.dll and b/Admin/lib/SharedLibrary.dll differ
diff --git a/Admin/version.txt b/Admin/version.txt
index 5ec7726e..34e9e3ef 100644
--- a/Admin/version.txt
+++ b/Admin/version.txt
@@ -6,7 +6,7 @@ CHANGELOG:
-fixed resolution of tempban times from console feedback
-reconfigured solution and projects to be correct debug/release and files copy properly
-started working on more advanced statistics
--fixed misc issues
+-fixed misc issuess
VERSION 1.4
CHANGELOG:
diff --git a/IW4MAdmin.sln b/IW4MAdmin.sln
index a809a46a..e6bc44a4 100644
--- a/IW4MAdmin.sln
+++ b/IW4MAdmin.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26730.16
+VisualStudioVersion = 15.0.27004.2006
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Admin\Application.csproj", "{DD5DCDA2-51DB-4B1A-922F-5705546E6115}"
ProjectSection(ProjectDependencies) = postProject
@@ -37,6 +37,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastRestartPlugin", "Plugin
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8C8F3945-0AEF-4949-A1F7-B18E952E50BC}"
ProjectSection(SolutionItems) = preProject
+ _customcallbacks.gsc = _customcallbacks.gsc
README.md = README.md
EndProjectSection
EndProject
diff --git a/Plugins/EventAPI/Plugin.cs b/Plugins/EventAPI/Plugin.cs
index 824b3b8b..2f8d93f2 100644
--- a/Plugins/EventAPI/Plugin.cs
+++ b/Plugins/EventAPI/Plugin.cs
@@ -146,7 +146,14 @@ namespace EventAPI
if (E.Type == Event.GType.Say && E.Origin.Level < Player.Permission.Moderator)
{
string message = E.Data.ToLower();
- bool flagged = message.Contains(" wh ") || message.Contains("hax") || message.Contains("cheat") || message.Contains("hack") || message.Contains("aim") || message.Contains("wall") || message.Contains("cheto") || message.Contains("hak");
+ bool flagged = message.Contains(" wh ") ||
+ message.Contains("hax") ||
+ message.Contains("cheat") ||
+ message.Contains(" hack ") ||
+ message.Contains("aim") ||
+ message.Contains("wall") ||
+ message.Contains("cheto") ||
+ message.Contains("hak");
if (flagged)
{
diff --git a/Plugins/FastRestart/Plugin.cs b/Plugins/FastRestart/Plugin.cs
index 024202a1..9091d52e 100644
--- a/Plugins/FastRestart/Plugin.cs
+++ b/Plugins/FastRestart/Plugin.cs
@@ -44,11 +44,11 @@ namespace Plugin
public static ConfigurationManager ConfigManager { get; private set; }
- public string Name { get { return "Fast Restarter"; } }
+ public string Name => "Fast Restarter";
- public float Version { get { return 1.0f; } }
+ public float Version => 1.0f;
- public string Author { get { return "RaidMax"; } }
+ public string Author => "RaidMax";
public async Task OnEventAsync(Event E, Server S)
{
@@ -67,7 +67,7 @@ namespace Plugin
catch (SharedLibrary.Exceptions.DvarException)
{
- await S.ExecuteCommandAsync("set src_intermission_time 20");
+ await S.SetDvarAsync("scr_intermission_time", 20);
}
}
}
diff --git a/Plugins/MessageBoard/MessageboardPlugin.csproj b/Plugins/MessageBoard/MessageboardPlugin.csproj
index b9553973..31514584 100644
--- a/Plugins/MessageBoard/MessageboardPlugin.csproj
+++ b/Plugins/MessageBoard/MessageboardPlugin.csproj
@@ -146,7 +146,7 @@ copy /Y "$(TargetDir)DNA.Text.dll" "$(SolutionDir)Admin\bin\$(ConfigurationName)
copy /Y "$(TargetDir)CryptSharp.dll" "$(SolutionDir)Admin\bin\$(ConfigurationName)\lib\CryptSharp.dll"
copy /Y "$(TargetDir)CodeKicker.BBcode.dll" "$(SolutionDir)Admin\bin\$(ConfigurationName)\lib\CodeKicker.BBcode.dll"
-copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\"
+if $(ConfigurationName) == Debug copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\"