1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-15 09:43:35 -05:00

allow prompt string to have an empty/default value

upgrade some project dependencies
don't try to run events on parsers
update top players rank distribution
This commit is contained in:
RaidMax
2020-02-17 10:05:31 -06:00
parent 89bee14216
commit 87987f885d
7 changed files with 30 additions and 16 deletions

View File

@ -23,6 +23,11 @@ namespace IW4MAdmin.Application.Misc
public string Author { get; set; }
/// <summary>
/// indicates if the plugin is a parser
/// </summary>
public bool IsParser { get; private set; }
public FileSystemWatcher Watcher { get; private set; }
private Engine _scriptEngine;
@ -107,6 +112,7 @@ namespace IW4MAdmin.Application.Misc
{
if (pluginObject.isParser)
{
IsParser = true;
IEventParser eventParser = (IEventParser)_scriptEngine.GetValue("eventParser").ToObject();
IRConParser rconParser = (IRConParser)_scriptEngine.GetValue("rconParser").ToObject();
manager.AdditionalEventParsers.Add(eventParser);
@ -149,7 +155,7 @@ namespace IW4MAdmin.Application.Misc
_scriptEngine.SetValue("_gameEvent", E);
_scriptEngine.SetValue("_server", S);
_scriptEngine.SetValue("_IW4MAdminClient", Utilities.IW4MAdminClient(S));
await Task.FromResult(_scriptEngine.Execute("plugin.onEventAsync(_gameEvent, _server)").GetCompletionValue());
_scriptEngine.Execute("plugin.onEventAsync(_gameEvent, _server)").GetCompletionValue();
}
catch