abstracting rcon parsing and event parsing

changed Event to GameEvent
finally fixed the stats NaN
check ip for bans
consolidated console, profile, and logout into dropdown
make sure game is iw4 before using :^ in say
fix pm not showing from name if in web console
show time left of temban on profile
This commit is contained in:
RaidMax
2018-04-13 01:32:30 -05:00
parent 827e69f70a
commit 4caa4655e2
34 changed files with 519 additions and 272 deletions

View File

@ -5,7 +5,7 @@ namespace SharedLibraryCore.Interfaces
{
public interface IEventApi
{
void OnServerEvent(object sender, Event E);
void OnServerEvent(object sender, GameEvent E);
Queue<EventInfo> GetEvents();
}
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace SharedLibraryCore.Interfaces
{
public interface IEventParser
{
GameEvent GetEvent(Server server, string logLine);
}
}

View File

@ -7,7 +7,7 @@ namespace SharedLibraryCore.Interfaces
{
Task OnLoadAsync(IManager manager);
Task OnUnloadAsync();
Task OnEventAsync(Event E, Server S);
Task OnEventAsync(GameEvent E, Server S);
Task OnTickAsync(Server S);
//for logging purposes

View File

@ -1,16 +1,16 @@
using SharedLibraryCore.Objects;
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Generic;
using System.Threading.Tasks;
using SharedLibraryCore.Objects;
using SharedLibraryCore.RCon;
namespace SharedLibraryCore.Interfaces
{
public interface IRConParser
{
Task<Dvar<T>> GetDvarAsync<T>(RCon.Connection connection, string dvarName);
Task<bool> SetDvarAsync(RCon.Connection connection, string dvarName, object dvarValue);
Task<string[]> ExecuteCommandAsync(RCon.Connection connection, string command);
Task<List<Player>> GetStatusAsync(RCon.Connection connection);
Task<Dvar<T>> GetDvarAsync<T>(Connection connection, string dvarName);
Task<bool> SetDvarAsync(Connection connection, string dvarName, object dvarValue);
Task<string[]> ExecuteCommandAsync(Connection connection, string command);
Task<List<Player>> GetStatusAsync(Connection connection);
CommandPrefix GetCommandPrefixes();
}
}