diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2011-08-20 23:03:24 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2011-08-21 15:57:19 +0200 |
commit | f3ed88587fe93c5745731a8d689c046b9a009e3f (patch) | |
tree | 01c71a596b32b78e7c57fc9a708a4f2df3b31367 | |
parent | 4c4c318024fa2688b31be0abe0a27da86b808bf7 (diff) | |
download | miniircd-f3ed88587fe93c5745731a8d689c046b9a009e3f.tar.gz miniircd-f3ed88587fe93c5745731a8d689c046b9a009e3f.zip |
Pass options instance to Server
-rwxr-xr-x | miniircd | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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: |