From 0ba889bf75dec3d8df4927aff1cd13cf9e89b2d8 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 17 Jan 2016 10:52:25 -0600 Subject: [PATCH] ircbot: _unload_plugin doesn't need connection --- dr_botzo/ircbot/bot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dr_botzo/ircbot/bot.py b/dr_botzo/ircbot/bot.py index 9cec53a..35225c8 100644 --- a/dr_botzo/ircbot/bot.py +++ b/dr_botzo/ircbot/bot.py @@ -684,16 +684,14 @@ class IRCBot(irc.client.SimpleIRCClient): if has_perm: plugin_path = match.group(1) log.debug("calling _unload_plugin on %s", plugin_path) - self._unload_plugin(connection, event, plugin_path) + self._unload_plugin(event, plugin_path) - def _unload_plugin(self, connection, event, plugin_path, feedback=True): + def _unload_plugin(self, event, plugin_path, feedback=True): """Attempt to unload and del a module if it's loaded. This stops the plugin, which should (if it's coded properly) disconnect its event handlers and kill threads and whatnot. - :param connection: connection for this unload request - :type connection: LenientServerConnection :param event: associated irc event object :type event: Event :param plugin_path: path (likely a relative one) of the plugin to attempt to unload