From e832736e0bf315585f873b43520d1d771930a1c2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 4 Nov 2013 21:51:24 +0000 Subject: Autogeneration of settings.ini and webadmin.ini Fixes issue #75 --- source/PluginManager.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/PluginManager.h') diff --git a/source/PluginManager.h b/source/PluginManager.h index 816e4a40c..f2ea000c9 100644 --- a/source/PluginManager.h +++ b/source/PluginManager.h @@ -271,7 +271,14 @@ private: cPluginManager(); ~cPluginManager(); + /// Reloads all plugins, defaulting to settings.ini for settings location void ReloadPluginsNow(void); + + /// Reloads all plugins with a cIniFile object expected to be initialised to settings.ini + /// Used because cRoot otherwise overwrites any configuration generation here if cRoot's IniFile is not used + void ReloadPluginsNow(cIniFile & a_SettingsIni); + + /// Unloads all plugins void UnloadPluginsNow(void); /// Adds the plugin into the internal list of plugins and initializes it. If initialization fails, the plugin is removed again. -- cgit v1.2.3 From a263dc8e83d1dc805aac8469cc2c740d88336575 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 5 Nov 2013 21:15:39 +0000 Subject: Implemented suggestions - Reverted changes to WebAdmin.cpp IPv6 ports and Server.cpp server description + Added default value explicitly for HardCore value * Split PluginManager plugin defaults write to new function - Removed a commented block from BlockTorch and... + Added g_BlockIsTorchPlaceable to Defines.h --- source/PluginManager.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/PluginManager.h') diff --git a/source/PluginManager.h b/source/PluginManager.h index f2ea000c9..4140bffb5 100644 --- a/source/PluginManager.h +++ b/source/PluginManager.h @@ -275,12 +275,14 @@ private: void ReloadPluginsNow(void); /// Reloads all plugins with a cIniFile object expected to be initialised to settings.ini - /// Used because cRoot otherwise overwrites any configuration generation here if cRoot's IniFile is not used void ReloadPluginsNow(cIniFile & a_SettingsIni); /// Unloads all plugins void UnloadPluginsNow(void); + /// Handles writing default plugins if 'Plugins' key not found using a cIniFile object expected to be intialised to settings.ini + void InsertDefaultPlugins(cIniFile & a_SettingsIni); + /// Adds the plugin into the internal list of plugins and initializes it. If initialization fails, the plugin is removed again. bool AddPlugin(cPlugin * a_Plugin); -- cgit v1.2.3