mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Don't actually load disabled plugins lol
This commit is contained in:
parent
8665d22f48
commit
cf9e5ed66c
1 changed files with 7 additions and 1 deletions
|
@ -140,6 +140,7 @@ void PluginController::load(QFileInfo index, QDir pluginDir, PluginMeta meta)
|
|||
|
||||
auto pluginName = pluginDir.dirName();
|
||||
auto plugin = std::make_unique<Plugin>(pluginName, l, meta, pluginDir);
|
||||
|
||||
for (const auto &[codename, other] : this->plugins_)
|
||||
{
|
||||
if (other->meta.name == meta.name)
|
||||
|
@ -148,8 +149,13 @@ void PluginController::load(QFileInfo index, QDir pluginDir, PluginMeta meta)
|
|||
other->isDupeName = true;
|
||||
}
|
||||
}
|
||||
|
||||
this->plugins_.insert({pluginName, std::move(plugin)});
|
||||
if (!this->isEnabled(pluginName))
|
||||
{
|
||||
qCInfo(chatterinoLua) << "Skipping loading" << pluginName << "("
|
||||
<< meta.name << ") because it is disabled";
|
||||
return;
|
||||
}
|
||||
|
||||
int err = luaL_dofile(l, index.absoluteFilePath().toStdString().c_str());
|
||||
if (err != 0)
|
||||
|
|
Loading…
Reference in a new issue