fixed issue with status response erroring when incorrect length
view angle vector parse fail is now a handled exception change local host check to byte array to make it faster than comparing string kick command now requires moderator level or higher tempban now requires administrator level or higher hopefully fixed negative SPM bug pipelined the events and consolidated them to run through GameEventHandler uniform console colors
This commit is contained in:
28
SharedLibraryCore/Interfaces/IEventHandler.cs
Normal file
28
SharedLibraryCore/Interfaces/IEventHandler.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// This class handle games events (from log, manual events, etc)
|
||||
/// </summary>
|
||||
public interface IEventHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a game event event to the queue to be processed
|
||||
/// </summary>
|
||||
/// <param name="gameEvent">Game event</param>
|
||||
void AddEvent(GameEvent gameEvent);
|
||||
/// <summary>
|
||||
/// Get the next event to be processed
|
||||
/// </summary>
|
||||
/// <returns>Game event that needs to be processed</returns>
|
||||
GameEvent GetNextEvent();
|
||||
/// <summary>
|
||||
/// If an event has output. Like executing a command wait until it's available
|
||||
/// </summary>
|
||||
/// <returns>List of output strings</returns>
|
||||
string[] GetEventOutput();
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ namespace SharedLibraryCore.Interfaces
|
||||
/// <param name="server">server the event occurred on</param>
|
||||
/// <param name="logLine">single log line string</param>
|
||||
/// <returns></returns>
|
||||
/// todo: make this integrate without needing the server
|
||||
GameEvent GetEvent(Server server, string logLine);
|
||||
/// <summary>
|
||||
/// Get game specific folder prefix for log files
|
||||
|
@ -23,6 +23,15 @@ namespace SharedLibraryCore.Interfaces
|
||||
PenaltyService GetPenaltyService();
|
||||
IDictionary<int, Player> GetPrivilegedClients();
|
||||
IEventApi GetEventApi();
|
||||
/// <summary>
|
||||
/// Get the event handlers
|
||||
/// </summary>
|
||||
/// <returns>EventHandler for the manager</returns>
|
||||
IEventHandler GetEventHandler();
|
||||
/// <summary>
|
||||
/// Signal to the manager that event(s) needs to be processed
|
||||
/// </summary>
|
||||
void SetHasEvent();
|
||||
bool ShutdownRequested();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user