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

Added additional properties method to allow easier extension to client properties

updated VPN plugin to use WebClient
message is sent to client trying to execute commands before they are authenticated
fixed rare issue with ToAdmins failing
record bullet distance fraction for client kills (_customcallbacks)
change client level/permissions through webfront
ability to tempban through webfront
This commit is contained in:
RaidMax
2018-09-02 16:59:27 -05:00
parent 50b4426cab
commit bc0fe3daec
33 changed files with 1099 additions and 177 deletions

View File

@ -19,7 +19,6 @@ using SharedLibraryCore.Localization;
using IW4MAdmin.Application.RconParsers;
using IW4MAdmin.Application.EventParsers;
using IW4MAdmin.Application.IO;
using IW4MAdmin.Application.Core;
namespace IW4MAdmin
{
@ -300,40 +299,6 @@ namespace IW4MAdmin
}
}
//// this allows us to catch exceptions but still run it parallel
//async Task pluginHandlingAsync(Task onEvent, string pluginName)
//{
// try
// {
// await onEvent;
// }
// // this happens if a plugin (login) wants to stop commands from executing
// catch (AuthorizationException e)
// {
// await E.Origin.Tell($"{loc["COMMAND_NOTAUTHORIZED"]} - {e.Message}");
// canExecuteCommand = false;
// }
// catch (Exception Except)
// {
// Logger.WriteError($"{loc["SERVER_PLUGIN_ERROR"]} [{pluginName}]");
// Logger.WriteDebug(String.Format("Error Message: {0}", Except.Message));
// Logger.WriteDebug(String.Format("Error Trace: {0}", Except.StackTrace));
// while (Except.InnerException != null)
// {
// Except = Except.InnerException;
// Logger.WriteDebug($"Inner exception: {Except.Message}");
// }
// }
//}
//var pluginTasks = SharedLibraryCore.Plugins.PluginImporter.ActivePlugins.
// Select(p => pluginHandlingAsync(p.OnEventAsync(E, this), p.Name));
//// execute all the plugin updates simultaneously
//await Task.WhenAll(pluginTasks);
foreach (var plugin in SharedLibraryCore.Plugins.PluginImporter.ActivePlugins)
{
try
@ -629,6 +594,13 @@ namespace IW4MAdmin
// this are our new connecting clients
foreach (var client in polledClients[0])
{
// this prevents duplicate events from being sent to the event api
if (GetPlayersAsList().Count(c => c.NetworkId == client.NetworkId &&
c.State == Player.ClientState.Connected) != 0)
{
continue;
}
var e = new GameEvent()
{
Type = GameEvent.EventType.Connect,
@ -810,7 +782,7 @@ namespace IW4MAdmin
logfile = await this.GetDvarAsync<string>("g_log");
}
CustomCallback = await ScriptLoaded();
//CustomCallback = await ScriptLoaded();
string mainPath = EventParser.GetGameDir();
#if DEBUG
basepath.Value = @"D:\";