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

@ -37,7 +37,7 @@ namespace IW4MAdmin.Application
// define what the delagate function looks like
public delegate void OnServerEventEventHandler(object sender, GameEventArgs e);
// expose the event handler so we can execute the events
public OnServerEventEventHandler OnServerEvent { get; set; }
public OnServerEventEventHandler OnServerEvent { get; set; }
public DateTime StartTime { get; private set; }
static ApplicationManager Instance;
@ -81,6 +81,11 @@ namespace IW4MAdmin.Application
if (GameEvent.ShouldOriginEventBeDelayed(newEvent))
{
Logger.WriteDebug($"Delaying origin execution of event type {newEvent.Type} for {newEvent.Origin} because they are not authed");
if (newEvent.Type == GameEvent.EventType.Command)
{
await newEvent.Origin.Tell(Utilities.CurrentLocalization.LocalizationIndex["SERVER_DELAYED_EVENT_WAIT"]);
}
// offload it to the player to keep
newEvent.Origin.DelayedEvents.Enqueue(newEvent);
return;
@ -95,7 +100,7 @@ namespace IW4MAdmin.Application
return;
}
//// todo: this is a hacky mess
if (newEvent.Origin?.DelayedEvents.Count > 0 &&
@ -104,7 +109,7 @@ namespace IW4MAdmin.Application
var events = newEvent.Origin.DelayedEvents;
// add the delayed event to the queue
while(events.Count > 0)
while (events.Count > 0)
{
var oldEvent = events.Dequeue();
@ -143,7 +148,7 @@ namespace IW4MAdmin.Application
await newEvent.Owner.ExecuteEvent(newEvent);
#if DEBUG
Logger.WriteDebug($"Processed event with id {newEvent.Id}");
Logger.WriteDebug($"Processed event with id {newEvent.Id}");
#endif
}