mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
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:
@ -22,12 +22,12 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
IManager Manager;
|
||||
Task CompletedTask = Task.FromResult(false);
|
||||
|
||||
public async Task OnEventAsync(Event E, Server S)
|
||||
public async Task OnEventAsync(GameEvent E, Server S)
|
||||
{
|
||||
if (!Settings.Configuration().EnableProfanityDeterment)
|
||||
return;
|
||||
|
||||
if (E.Type == Event.GType.Connect)
|
||||
if (E.Type == GameEvent.EventType.Connect)
|
||||
{
|
||||
if (!ProfanityCounts.TryAdd(E.Origin.ClientId, new Tracking(E.Origin)))
|
||||
{
|
||||
@ -36,7 +36,7 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Disconnect)
|
||||
if (E.Type == GameEvent.EventType.Disconnect)
|
||||
{
|
||||
if (!ProfanityCounts.TryRemove(E.Origin.ClientId, out Tracking old))
|
||||
{
|
||||
@ -44,7 +44,7 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
}
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Say)
|
||||
if (E.Type == GameEvent.EventType.Say)
|
||||
{
|
||||
var objectionalWords = Settings.Configuration().OffensiveWords;
|
||||
bool containsObjectionalWord = objectionalWords.FirstOrDefault(w => E.Data.ToLower().Contains(w)) != null;
|
||||
|
Reference in New Issue
Block a user