1
0

Plugin reload <plugin_name> feature (#4942)

+ Add `reload <pluginname>`
* Fixes #365

Co-authored-by: Alexander Harkness <me@bearbin.net>
Co-authored-by: pwnOrbitals <c.de-claverie@pm.me>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
[IPSA] Chris de Claverie
2020-09-28 00:15:03 +02:00
committed by GitHub
parent 410d6c0045
commit 9a548b3b3e
6 changed files with 89 additions and 28 deletions

View File

@@ -463,7 +463,15 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
}
else if (split[0] == "reload")
{
cPluginManager::Get()->ReloadPlugins();
if (split.size() > 1)
{
cPluginManager::Get()->ReloadPlugin(split[1]);
a_Output.Out("Plugin reload scheduled");
}
else
{
cPluginManager::Get()->ReloadPlugins();
}
a_Output.Finished();
return;
}