ircbot: _unload_plugin doesn't need connection
This commit is contained in:
parent
97c18a2459
commit
0ba889bf75
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue