From f97f2d2fda67a9b9465a90e9fc30982432348a6c Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 7 Jul 2016 22:41:51 -0700 Subject: [PATCH] automode: call unregisterService() on unload --- plugins/automode.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/automode.py b/plugins/automode.py index c71ea2a..cc7ab57 100644 --- a/plugins/automode.py +++ b/plugins/automode.py @@ -13,7 +13,7 @@ mydesc = ("The \x02Automode\x02 plugin provides simple channel ACL management by "to users matching hostmasks or exttargets.") # Register ourselves as a service. -modebot = utils.registerService("Automode", desc=mydesc) +modebot = utils.registerService("automode", desc=mydesc) reply = modebot.reply # Databasing variables. @@ -69,12 +69,14 @@ def die(sourceirc): """Saves the Automode database and quit.""" exportDB() - # Kill the scheduling forexports. + # Kill the scheduling for exports. global exportdb_timer if exportdb_timer: log.debug("Automode: cancelling exportDB timer thread %s due to die()", threading.get_ident()) exportdb_timer.cancel() + utils.unregisterService('automode') + def setacc(irc, source, args): """