aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/mods/modmanager.cpp
diff options
context:
space:
mode:
authorF1F7Y <64418963+F1F7Y@users.noreply.github.com>2023-07-02 13:24:41 +0200
committerGitHub <noreply@github.com>2023-07-02 13:24:41 +0200
commit10cb6e53ac9cc2536726445ab6782d22a74e71b8 (patch)
treee03db820dbf2ce76f3de079081cec01ac9350084 /NorthstarDLL/mods/modmanager.cpp
parente4de2f314516d1432022537880eb6347e33e5cf4 (diff)
downloadNorthstarLauncher-10cb6e53ac9cc2536726445ab6782d22a74e71b8.tar.gz
NorthstarLauncher-10cb6e53ac9cc2536726445ab6782d22a74e71b8.zip
Basic mods blacklisting (#474)v1.16.0-rc2v1.16.0
Diffstat (limited to 'NorthstarDLL/mods/modmanager.cpp')
-rw-r--r--NorthstarDLL/mods/modmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp
index 8ac9ac54..cdfe5384 100644
--- a/NorthstarDLL/mods/modmanager.cpp
+++ b/NorthstarDLL/mods/modmanager.cpp
@@ -56,6 +56,13 @@ Mod::Mod(fs::path modDir, char* jsonBuf)
Name = modJson["Name"].GetString();
+ // Don't load blacklisted mods
+ if (!strstr(GetCommandLineA(), "-nomodblacklist") && MODS_BLACKLIST.find(Name) != std::end(MODS_BLACKLIST))
+ {
+ spdlog::warn("Skipping blacklisted mod \"{}\"!", Name);
+ return;
+ }
+
if (modJson.HasMember("Description"))
Description = modJson["Description"].GetString();
else