IW4M-Admin/Plugins/IW4ScriptCommands/Plugin.cs
RaidMax e60f612f95 [application] added chat context to profile page
[iw4script] reworked balance to balance based on performance rating
[stats] log penalty context to database
2018-06-05 16:31:36 -05:00

40 lines
1.0 KiB
C#

using SharedLibraryCore;
using SharedLibraryCore.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace IW4ScriptCommands
{
class Plugin : IPlugin
{
public string Name => "IW4 Script Commands";
public float Version => 1.0f;
public string Author => "RaidMax";
public Task OnEventAsync(GameEvent E, Server S)
{
if (E.Type == GameEvent.EventType.JoinTeam || E.Type == GameEvent.EventType.Disconnect)
{
E.Origin = new SharedLibraryCore.Objects.Player()
{
ClientId = 1,
CurrentServer = E.Owner
};
return new Commands.Balance().ExecuteAsync(E);
}
return Task.CompletedTask;
}
public Task OnLoadAsync(IManager manager) => Task.CompletedTask;
public Task OnTickAsync(Server S) => Task.CompletedTask;
public Task OnUnloadAsync() => Task.CompletedTask;
}
}