kharidiron / StarryPy

Plugin-driven Starbound proxy server built using Twisted.
Do What The F*ck You Want To Public License
10 stars 3 forks source link

keep list of activated plugins. only deactivate active plugins on close/deactivation. #21

Closed natemontgomery closed 9 years ago

natemontgomery commented 9 years ago

Was getting an error on exit from web_gui, which I imported from an old version folder, but I didn't have it activated (auto_activate: false).

This changes the deactivate() method of plugin_manager to only care about plugins that have been activated.

This does make the plugin_manager no longer check the 'load_order' during deactivation, but this doesn't currently effect anything (kinda messy though I know).

I had the idea to make this cleaner by refactoring the plugin_manager to only load plugins that we want (rather than all plugins in plugin_dir), but that is going to take a bit longer.

I can understand if you don't like this change as the motivation could be seen as a bug in the web_gui plugin, but people who are trying to use StarryPy could end up copying their plugins folders between versions and get strange errors from plugins they don't use (like I did).

kharidiron commented 9 years ago

I like the idea of your refactoring, so I'm going to opt to go for that instead. The code looks good already, though it needs some more testing on my part.