diff options
-rw-r--r-- | __init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py index b55f842..e97496b 100644 --- a/__init__.py +++ b/__init__.py @@ -36,6 +36,9 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin): self._xmpp.connect() self._xmpp.process(wait=True) + def unload(self): + self._xmpp.disconnect(wait=True) + def get_settings_defaults(self): return { 'xmpp': { @@ -183,5 +186,9 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin): __plugin_name__ = "OctoXMPP" __plugin_version__ = "0.2.0" -__plugin_description__ = "Notify about some Events over XMPP." +__plugin_description__ = "Control OctoPrint via XMPP messages." __plugin_implementation__ = OctoXMPP() + +def __plugin_unload__(): + global __plugin_implementation__ + __plugin_implementation__.unload() |