'alias' -> 'str(server)' as alias does not exist in the current context

This commit is contained in:
jesopo 2019-05-30 16:17:39 +01:00
parent a3a61d2e86
commit 17ee70cdd6

View file

@ -81,10 +81,11 @@ class Module(ModuleManager.BaseModule):
id = self.bot.database.servers.get_by_alias(alias)
if id == None:
raise utils.EventError("Unknown server alias")
server = self.bot.get_server_by_id(id)
server.disconnect()
self.bot.disconnect(server)
event["stdout"].write("Disconnected from %s" % alias)
event["stdout"].write("Disconnected from %s" % str(server))
@utils.hook("received.command.shutdown")
def shutdown(self, event):