mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 03:49:19 +01:00
treat banned plugins like out of date, dont load but allow update
This commit is contained in:
parent
0cfbc70286
commit
c34d4dfd87
3 changed files with 36 additions and 1 deletions
|
|
@ -548,6 +548,11 @@ namespace Dalamud.Plugin.Internal
|
|||
PluginLocations.Remove(plugin.AssemblyName.FullName);
|
||||
throw;
|
||||
}
|
||||
catch (BannedPluginException)
|
||||
{
|
||||
// Out of date plugins get added so they can be updated.
|
||||
Log.Information($"Plugin was banned, adding anyways: {dllFile.Name}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (plugin.IsDev)
|
||||
|
|
@ -936,7 +941,12 @@ namespace Dalamud.Plugin.Internal
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool IsManifestBanned(PluginManifest manifest)
|
||||
/// <summary>
|
||||
/// Determine if a plugin has been banned by inspecting the manifest.
|
||||
/// </summary>
|
||||
/// <param name="manifest">Manifest to inspect.</param>
|
||||
/// <returns>A value indicating whether the plugin/manifest has been banned.</returns>
|
||||
public bool IsManifestBanned(PluginManifest manifest)
|
||||
{
|
||||
return this.bannedPlugins.Any(ban => ban.Name == manifest.InternalName && ban.AssemblyVersion == manifest.AssemblyVersion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue