diff --git a/coremods/control.py b/coremods/control.py index 3f4af52..e6bd1ed 100644 --- a/coremods/control.py +++ b/coremods/control.py @@ -38,7 +38,7 @@ def _kill_plugins(irc=None): if hasattr(plugin, 'die'): log.debug('coremods.control: Running die() on plugin %s due to shutdown.', name) try: - plugin.die(irc) + plugin.die(irc=irc) except: # But don't allow it to crash the server. log.exception('coremods.control: Error occurred in die() of plugin %s, skipping...', name) @@ -59,7 +59,7 @@ def _shutdown(irc=None): # HACK: run the _kill_plugins trigger with the current IRC object. XXX: We should really consider removing this # argument, since no plugins actually use it to do anything. atexit.unregister(_kill_plugins) - _kill_plugins(irc) + _kill_plugins(irc=irc) # Remove our main PyLink bot as well. utils.unregisterService('pylink') diff --git a/coremods/corecommands.py b/coremods/corecommands.py index 68df8e3..ca245e5 100644 --- a/coremods/corecommands.py +++ b/coremods/corecommands.py @@ -67,7 +67,7 @@ def shutdown(irc, source, args): log.info('(%s) SHUTDOWN requested by "%s!%s@%s", exiting...', irc.name, u.nick, u.ident, u.host) - control._shutdown(irc) + control._shutdown(irc=irc) @utils.add_cmd def load(irc, source, args):