diff --git a/coreplugin.py b/coreplugin.py index 9e9471e..cd10ca1 100644 --- a/coreplugin.py +++ b/coreplugin.py @@ -177,7 +177,7 @@ def shutdown(irc, source, args): for ircobj in world.networkobjects.values(): # Disable auto-connect first by setting the time to negative. ircobj.serverdata['autoconnect'] = -1 - ircobj.disconnect(callhook=False) + ircobj.disconnect() def load(irc, source, args): """. diff --git a/plugins/networks.py b/plugins/networks.py index a0d1c63..30c35f9 100644 --- a/plugins/networks.py +++ b/plugins/networks.py @@ -28,8 +28,9 @@ def disconnect(irc, source, args): irc.reply('Error: No such network "%s" (case sensitive).' % netname) return irc.reply("Done.") + # Abort the connection! Simple as that. - network.aborted.set() + network.disconnect() @utils.add_cmd def connect(irc, source, args): diff --git a/plugins/relay.py b/plugins/relay.py index 23367f6..43b78cf 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -204,7 +204,7 @@ def getRemoteSid(irc, remoteirc): except ValueError: # Network not initialized yet. log.exception('(%s) Failed to spawn server for %r:', irc.name, remoteirc.name) - irc.aborted.set() + irc.disconnect() return else: irc.servers[sid].remote = remoteirc.name @@ -981,7 +981,7 @@ def handle_kill(irc, numeric, command, args): else: log.error('(%s) Too many kills received for target %s, aborting!', irc.name, userdata.nick) - irc.aborted.set() + irc.disconnect() killcache[irc.name] += 1 # Target user was local.