1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-14 09:08:32 -05:00

Moved client database into manager, as it should be.. Some more transitional things and a few fixes.

This commit is contained in:
RaidMax
2017-05-27 17:08:04 -05:00
parent c151bcbdae
commit c1faf8a02e
26 changed files with 215 additions and 186 deletions

View File

@ -95,7 +95,7 @@ namespace EventAPI
}
}
public async Task OnLoad()
public async Task OnLoadAsync()
{
apiEvents = new Queue<RestEvent>();
flaggedMessagesText = new List<string>();
@ -103,29 +103,28 @@ namespace EventAPI
WebService.pageList.Add(new EventsJSON());
}
public async Task OnUnload()
public async Task OnUnloadAsync()
{
apiEvents.Clear();
activeServers.Clear();
}
public async Task OnTick(Server S)
public async Task OnTickAsync(Server S)
{
return;
}
public async Task OnEvent(Event E, Server S)
public async Task OnEventAsync(Event E, Server S)
{
if (E.Type == Event.GType.Start)
{
activeServers.Add(S);
S.Log.Write("Event API now running on " + S.getName(), Log.Level.Production);
}
if (E.Type == Event.GType.Stop)
{
// fixme: this will be bad once FTP is working and there can be multiple servers on the same port.
activeServers.RemoveAll(s => s.getPort() == S.getPort());
S.Log.Write("Event API no longer running on " + S.getName(), Log.Level.Production);
}
if (E.Type == Event.GType.Connect)