summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-05 22:15:39 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-05 22:15:39 +0100
commita263dc8e83d1dc805aac8469cc2c740d88336575 (patch)
tree282f0ded16c33662a2f13244c6fa949fcdce182b /source/PluginManager.cpp
parentRemoved settings/webadmin.example.ini files (diff)
downloadcuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar.gz
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar.bz2
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar.lz
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar.xz
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.tar.zst
cuberite-a263dc8e83d1dc805aac8469cc2c740d88336575.zip
Diffstat (limited to 'source/PluginManager.cpp')
-rw-r--r--source/PluginManager.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 0ff7736ec..3ac2366ca 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -118,13 +118,7 @@ void cPluginManager::ReloadPluginsNow(cIniFile & a_SettingsIni)
unsigned int NumPlugins = ((KeyNum != -1) ? (a_SettingsIni.GetNumValues(KeyNum)) : 0);
if (KeyNum == -1)
{
- a_SettingsIni.AddKeyName("Plugins");
- a_SettingsIni.AddKeyComment("Plugins", " Plugin=Debuggers");
- a_SettingsIni.AddKeyComment("Plugins", " Plugin=HookNotify");
- a_SettingsIni.AddKeyComment("Plugins", " Plugin=ChunkWorx");
- a_SettingsIni.SetValue("Plugins", "Plugin", "Core");
- a_SettingsIni.SetValue("Plugins", "Plugin", "TransAPI");
- a_SettingsIni.SetValue("Plugins", "Plugin", "ChatLog");
+ InsertDefaultPlugins(a_SettingsIni);
}
else if (NumPlugins > 0)
{
@@ -163,6 +157,22 @@ void cPluginManager::ReloadPluginsNow(cIniFile & a_SettingsIni)
+void cPluginManager::InsertDefaultPlugins(cIniFile & a_SettingsIni)
+{
+ a_SettingsIni.AddKeyName("Plugins");
+ a_SettingsIni.AddKeyComment("Plugins", " Plugin=Debuggers");
+ a_SettingsIni.AddKeyComment("Plugins", " Plugin=HookNotify");
+ a_SettingsIni.AddKeyComment("Plugins", " Plugin=ChunkWorx");
+ a_SettingsIni.AddKeyComment("Plugins", " Plugin=APIDump");
+ a_SettingsIni.SetValue("Plugins", "Plugin", "Core");
+ a_SettingsIni.SetValue("Plugins", "Plugin", "TransAPI");
+ a_SettingsIni.SetValue("Plugins", "Plugin", "ChatLog");
+}
+
+
+
+
+
void cPluginManager::Tick(float a_Dt)
{
while (!m_DisablePluginList.empty())