diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-05 22:15:39 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-05 22:15:39 +0100 |
commit | a263dc8e83d1dc805aac8469cc2c740d88336575 (patch) | |
tree | 282f0ded16c33662a2f13244c6fa949fcdce182b /source/PluginManager.cpp | |
parent | Removed settings/webadmin.example.ini files (diff) | |
download | cuberite-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.cpp | 24 |
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()) |