1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

migrated Profanty Determent plugin

This commit is contained in:
RaidMax
2018-04-10 19:36:28 -05:00
parent 983ca0c667
commit f632a6d4c6
6 changed files with 57 additions and 147 deletions

View File

@ -1,18 +1,19 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Concurrent;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using SharedLibrary;
using SharedLibrary.Configuration;
using SharedLibrary.Interfaces;
using SharedLibraryCore;
using SharedLibraryCore.Configuration;
using SharedLibraryCore.Interfaces;
using SharedLibraryCore.Objects;
namespace ProfanityDeterment
namespace IW4MAdmin.Plugins.ProfanityDeterment
{
public class Plugin : IPlugin
{
public string Name => "ProfanityFilter";
public string Name => "ProfanityDeterment";
public float Version => 0.1f;
public float Version => Assembly.GetExecutingAssembly().GetName().Version.Major + Assembly.GetExecutingAssembly().GetName().Version.Minor / 10.0f;
public string Author => "RaidMax";
@ -53,7 +54,7 @@ namespace ProfanityDeterment
var clientProfanity = ProfanityCounts[E.Origin.ClientId];
if (clientProfanity.Infringements >= Settings.Configuration().KickAfterInfringementCount)
{
await clientProfanity.Client.Kick(Settings.Configuration().ProfanityKickMessage, new SharedLibrary.Objects.Player()
await clientProfanity.Client.Kick(Settings.Configuration().ProfanityKickMessage, new Player()
{
ClientId = 1
});
@ -63,7 +64,7 @@ namespace ProfanityDeterment
{
clientProfanity.Infringements++;
await clientProfanity.Client.Warn(Settings.Configuration().ProfanityWarningMessage, new SharedLibrary.Objects.Player()
await clientProfanity.Client.Warn(Settings.Configuration().ProfanityWarningMessage, new Player()
{
ClientId = 1
});