added chat report functionality and some other random stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Dalamud.Plugin;
|
||||
using LightlessSync.Services.Mediator;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Linq;
|
||||
|
||||
namespace LightlessSync.Interop.Ipc.Framework;
|
||||
|
||||
@@ -107,7 +108,9 @@ public abstract class IpcServiceBase : DisposableMediatorSubscriberBase, IIpcSer
|
||||
try
|
||||
{
|
||||
var plugin = PluginInterface.InstalledPlugins
|
||||
.FirstOrDefault(p => string.Equals(p.InternalName, Descriptor.InternalName, StringComparison.OrdinalIgnoreCase));
|
||||
.Where(p => string.Equals(p.InternalName, Descriptor.InternalName, StringComparison.OrdinalIgnoreCase))
|
||||
.OrderByDescending(p => p.IsLoaded)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (plugin == null)
|
||||
{
|
||||
@@ -119,7 +122,7 @@ public abstract class IpcServiceBase : DisposableMediatorSubscriberBase, IIpcSer
|
||||
return IpcConnectionState.VersionMismatch;
|
||||
}
|
||||
|
||||
if (!IsPluginEnabled())
|
||||
if (!IsPluginEnabled(plugin))
|
||||
{
|
||||
return IpcConnectionState.PluginDisabled;
|
||||
}
|
||||
@@ -138,8 +141,8 @@ public abstract class IpcServiceBase : DisposableMediatorSubscriberBase, IIpcSer
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool IsPluginEnabled()
|
||||
=> true;
|
||||
protected virtual bool IsPluginEnabled(IExposedPlugin plugin)
|
||||
=> plugin.IsLoaded;
|
||||
|
||||
protected virtual bool IsPluginReady()
|
||||
=> true;
|
||||
|
||||
Reference in New Issue
Block a user