From f3ed88587fe93c5745731a8d689c046b9a009e3f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 20 Aug 2011 23:03:24 +0200 Subject: Pass options instance to Server --- miniircd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/miniircd b/miniircd index 6cfa6cc..3764727 100755 --- a/miniircd +++ b/miniircd @@ -516,12 +516,12 @@ class Client(object): class Server(object): - def __init__(self, ports, password, motdfile, verbose, debug): - self.ports = ports - self.password = password - self.motdfile = motdfile - self.verbose = verbose - self.debug = debug + def __init__(self, options): + self.ports = options.ports + self.password = options.password + self.motdfile = options.motd + self.verbose = options.verbose + self.debug = options.debug self.name = socket.getfqdn()[:63] # Server name limit from the RFC. self.channels = {} # irc_lower(Channel name) --> Channel instance. self.clients = {} # Socket --> Client instance. @@ -693,8 +693,8 @@ def main(argv): ports.append(int(port)) except ValueError: op.error("bad port: %r" % port) - server = Server( - ports, options.password, options.motd, options.verbose, options.debug) + options.ports = ports + server = Server(options) if options.daemon: server.daemonize() try: -- cgit v1.2.3