From 48de2ee744f6cf523258307bb41404773adf3a87 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 28 Jul 2015 22:16:32 +0200 Subject: [PATCH] use new config value names in server --- server.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index 852459c..ad09de9 100755 --- a/server.py +++ b/server.py @@ -129,8 +129,8 @@ def expire(quotaonly=False, kill_event=None): class MissingComponent(ComponentXMPP): - def __init__(self, jid, secret): - ComponentXMPP.__init__(self, jid, secret, "localhost", 5347) + def __init__(self, jid, secret, port): + ComponentXMPP.__init__(self, jid, secret, "localhost", port) self.register_plugin('xep_0030') self.register_plugin('upload',module='plugins.upload') self.add_event_handler('request_upload_slot',self.request_upload_slot) @@ -302,8 +302,11 @@ if __name__ == "__main__": sys.exit(1) if 'keyfile' in config and 'certfile' in config: - server.socket = ssl.wrap_socket(server.socket, keyfile=config['keyfile'], certfile=config['certfile']) - xmpp = MissingComponent(config['jid'],config['secret']) + server.socket = ssl.wrap_socket(server.socket, keyfile=config['http_keyfile'], certfile=config['http_certfile']) + jid = config['component_jid'] + secret = config['component_secret'] + port = int(config.get('component_port',5347) + xmpp = MissingComponent(jid,secret,port) if xmpp.connect(): xmpp.process() print("connected")