Update version number and small plugin fix
This commit is contained in:
parent
ca535019c6
commit
07df6dbf79
@ -6,7 +6,7 @@
|
||||
<RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion>
|
||||
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
|
||||
<PackageId>RaidMax.IW4MAdmin.Application</PackageId>
|
||||
<Version>2.2.3.3</Version>
|
||||
<Version>2.2.4.0</Version>
|
||||
<Authors>RaidMax</Authors>
|
||||
<Company>Forever None</Company>
|
||||
<Product>IW4MAdmin</Product>
|
||||
@ -31,8 +31,8 @@
|
||||
<PropertyGroup>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
<TieredCompilation>true</TieredCompilation>
|
||||
<AssemblyVersion>2.2.3.3</AssemblyVersion>
|
||||
<FileVersion>2.2.3.3</FileVersion>
|
||||
<AssemblyVersion>2.2.4.0</AssemblyVersion>
|
||||
<FileVersion>2.2.4.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -865,7 +865,7 @@ namespace IW4MAdmin
|
||||
#if !DEBUG
|
||||
else
|
||||
{
|
||||
string formattedKick = String.Format(RconParser.GetCommandPrefixes().Kick, Target.ClientNumber, $"{loc["SERVER_KICK_TEXT"]} - ^5{Reason}^7");
|
||||
string formattedKick = String.Format(RconParser.Configuration.CommandPrefixes.Kick, Target.ClientNumber, $"{loc["SERVER_KICK_TEXT"]} - ^5{Reason}^7");
|
||||
await Target.CurrentServer.ExecuteCommandAsync(formattedKick);
|
||||
}
|
||||
#endif
|
||||
@ -904,7 +904,7 @@ namespace IW4MAdmin
|
||||
#if !DEBUG
|
||||
else
|
||||
{
|
||||
string formattedKick = String.Format(RconParser.GetCommandPrefixes().Kick, Target.ClientNumber, $"^7{loc["SERVER_TB_TEXT"]}- ^5{Reason}");
|
||||
string formattedKick = String.Format(RconParser.Configuration.CommandPrefixes.Kick, Target.ClientNumber, $"^7{loc["SERVER_TB_TEXT"]}- ^5{Reason}");
|
||||
await Target.CurrentServer.ExecuteCommandAsync(formattedKick);
|
||||
}
|
||||
#else
|
||||
@ -949,7 +949,7 @@ namespace IW4MAdmin
|
||||
targetClient.Level = EFClient.Permission.Banned;
|
||||
|
||||
#if !DEBUG
|
||||
string formattedString = String.Format(RconParser.GetCommandPrefixes().Kick, targetClient.ClientNumber, $"{loc["SERVER_BAN_TEXT"]} - ^5{reason} ^7({loc["SERVER_BAN_APPEAL"]} {Website})^7");
|
||||
string formattedString = String.Format(RconParser.Configuration.CommandPrefixes.Kick, targetClient.ClientNumber, $"{loc["SERVER_BAN_TEXT"]} - ^5{reason} ^7({loc["SERVER_BAN_APPEAL"]} {Website})^7");
|
||||
await targetClient.CurrentServer.ExecuteCommandAsync(formattedString);
|
||||
#else
|
||||
await targetClient.CurrentServer.OnClientDisconnected(targetClient);
|
||||
|
@ -1,7 +1,6 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -85,15 +84,20 @@ namespace SharedLibraryCore
|
||||
this.Version = (float)pluginObject.version;
|
||||
|
||||
|
||||
if (pluginObject.isParser)
|
||||
try
|
||||
{
|
||||
await OnLoadAsync(mgr);
|
||||
IEventParser eventParser = (IEventParser)ScriptEngine.GetValue("eventParser").ToObject();
|
||||
IRConParser rconParser = (IRConParser)ScriptEngine.GetValue("rconParser").ToObject();
|
||||
Manager.AdditionalEventParsers.Add(eventParser);
|
||||
Manager.AdditionalRConParsers.Add(rconParser);
|
||||
if (pluginObject.isParser)
|
||||
{
|
||||
await OnLoadAsync(mgr);
|
||||
IEventParser eventParser = (IEventParser)ScriptEngine.GetValue("eventParser").ToObject();
|
||||
IRConParser rconParser = (IRConParser)ScriptEngine.GetValue("rconParser").ToObject();
|
||||
Manager.AdditionalEventParsers.Add(eventParser);
|
||||
Manager.AdditionalRConParsers.Add(rconParser);
|
||||
}
|
||||
}
|
||||
|
||||
catch { }
|
||||
|
||||
|
||||
if (!firstRun)
|
||||
{
|
||||
await OnLoadAsync(mgr);
|
||||
@ -123,6 +127,9 @@ namespace SharedLibraryCore
|
||||
return Task.FromResult(ScriptEngine.Execute("plugin.onTickAsync(_server)").GetCompletionValue());
|
||||
}
|
||||
|
||||
public Task OnUnloadAsync() => Task.FromResult(ScriptEngine.Execute("plugin.onUnloadAsync()").GetCompletionValue());
|
||||
public Task OnUnloadAsync()
|
||||
{
|
||||
return Task.FromResult(ScriptEngine.Execute("plugin.onUnloadAsync()").GetCompletionValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ namespace SharedLibraryCore
|
||||
protected async Task Tell(String Message, EFClient Target)
|
||||
{
|
||||
#if !DEBUG
|
||||
string formattedMessage = String.Format(RconParser.GetCommandPrefixes().Tell, Target.ClientNumber, $"{(CustomSayEnabled ? $"{CustomSayName}: " : "")}{Message}");
|
||||
string formattedMessage = String.Format(RconParser.Configuration.CommandPrefixes.Tell, Target.ClientNumber, $"{(CustomSayEnabled ? $"{CustomSayName}: " : "")}{Message}");
|
||||
if (Target.ClientNumber > -1 && Message.Length > 0 && Target.Level != EFClient.Permission.Console)
|
||||
await this.ExecuteCommandAsync(formattedMessage);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user