From 13c4a274a224faf324fa7e9b7d48e04a2e63b63d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 3 Jul 2012 00:12:34 +0200 Subject: [PATCH] Reference a server from every listener --- ircd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ircd.py b/ircd.py index 3b56fdd..305374e 100755 --- a/ircd.py +++ b/ircd.py @@ -26,13 +26,14 @@ class ircd: class listener: ssl = False + server = None client_list = [] client_map = {} select_inputs = [] select_outputs = [] - def __init__(self): - pass + def __init__(self, server): + self.server = server def start(self, interface, port, cert_path, key_path): bindsocket = socket.socket() @@ -207,5 +208,7 @@ class presence: status = "none" joined = 0 -l = listener() +server = ircd() + +l = listener(server) l.start("0.0.0.0", 6667, "sample.cert", "sample.key")