also cancel reconnections with !disconnect
This commit is contained in:
parent
19d8f0b497
commit
14125a6048
1 changed files with 9 additions and 2 deletions
|
@ -83,8 +83,15 @@ class Module(ModuleManager.BaseModule):
|
|||
raise utils.EventError("Unknown server alias")
|
||||
|
||||
server = self.bot.get_server_by_id(id)
|
||||
server.disconnect()
|
||||
self.bot.disconnect(server)
|
||||
if not server == None:
|
||||
server.disconnect()
|
||||
self.bot.disconnect(server)
|
||||
elif id in event["server"].reconnections:
|
||||
event["server"].reconnections[id].cancel()
|
||||
del event["server"].reconnections[id]
|
||||
else:
|
||||
raise utils.EventError("Server not connected")
|
||||
|
||||
event["stdout"].write("Disconnected from %s" % str(server))
|
||||
|
||||
@utils.hook("received.command.shutdown")
|
||||
|
|
Loading…
Reference in a new issue