mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-28 13:42:37 +01:00
core: consistently call die() with irc as a keyword argument
This commit is contained in:
parent
b8a254167c
commit
22e6992770
@ -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')
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user