mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
feat: add ban reason in the installer
This commit is contained in:
parent
daaf3c9328
commit
f8966318c8
3 changed files with 27 additions and 2 deletions
|
|
@ -954,6 +954,16 @@ namespace Dalamud.Plugin.Internal
|
|||
return this.bannedPlugins.Any(ban => ban.Name == manifest.InternalName && ban.AssemblyVersion == manifest.AssemblyVersion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the reason of a banned plugin by inspecting the manifest.
|
||||
/// </summary>
|
||||
/// <param name="manifest">Manifest to inspect.</param>
|
||||
/// <returns>The reason of the ban, if any.</returns>
|
||||
public string GetBanReason(PluginManifest manifest)
|
||||
{
|
||||
return this.bannedPlugins.FirstOrDefault(ban => ban.Name == manifest.InternalName).Reason;
|
||||
}
|
||||
|
||||
private void DetectAvailablePluginUpdates()
|
||||
{
|
||||
var updatablePlugins = new List<AvailablePluginUpdate>();
|
||||
|
|
@ -1024,6 +1034,9 @@ namespace Dalamud.Plugin.Internal
|
|||
|
||||
[JsonProperty]
|
||||
public Version AssemblyVersion { get; private set; }
|
||||
|
||||
[JsonProperty]
|
||||
public string Reason { get; private set; }
|
||||
}
|
||||
|
||||
private struct PluginDef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue