summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2011-08-20 23:03:24 +0200
committerJoel Rosdahl <joel@rosdahl.net>2011-08-21 15:57:19 +0200
commitf3ed88587fe93c5745731a8d689c046b9a009e3f (patch)
tree01c71a596b32b78e7c57fc9a708a4f2df3b31367 /miniircd
parent4c4c318024fa2688b31be0abe0a27da86b808bf7 (diff)
downloadminiircd-f3ed88587fe93c5745731a8d689c046b9a009e3f.tar.gz
miniircd-f3ed88587fe93c5745731a8d689c046b9a009e3f.zip
Pass options instance to Server
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd16
1 files 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: