01-26-2013, 05:16 PM
I'd like to propose a change in the settings.ini regarding the plugins. This change would make our ini file standards-conformant, and probably easier to manage, especially regarding the order of the plugins.
Instead of listing each plugin separately on a line, I'm proposing a single value, "Enabled", which will have a comma-separated list of enabled plugins. This way it will be clear as to the loading order, no INI editor could mess that up, and we already have comma-separated list parser anyway.
Also, as part of this change, it would be great to actually implement an API in cPluginManager to manipulate this list, something in the lines of:
- EnablePlugin("Name", Position)
- DisablePlugin("Name")
- MovePluginUp("Name", NumPositions)
- MovePluginDown("Name", NumPositions)
- MovePluginToTop("Name")
- MovePluginToBottom("Name")
- GetPluginPosition("Name")
- GetNumPlugins()
- GetPlugins()
How about that?
Instead of listing each plugin separately on a line, I'm proposing a single value, "Enabled", which will have a comma-separated list of enabled plugins. This way it will be clear as to the loading order, no INI editor could mess that up, and we already have comma-separated list parser anyway.
Also, as part of this change, it would be great to actually implement an API in cPluginManager to manipulate this list, something in the lines of:
- EnablePlugin("Name", Position)
- DisablePlugin("Name")
- MovePluginUp("Name", NumPositions)
- MovePluginDown("Name", NumPositions)
- MovePluginToTop("Name")
- MovePluginToBottom("Name")
- GetPluginPosition("Name")
- GetNumPlugins()
- GetPlugins()
How about that?


)
I, too, like to disable plugins simply by commenting out lines; but even that shows one very big flaw - automated INI processors (such as MCServer) are not guaranteed to even support multiple same-value lines, and if they do, they don't guarantee that they'll keep the order in which the lines appear. MCServer currently happens to do that for regular lines, but it already moves all comments to the top of a section.