summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Fuchs <fuky@asu.cas.cz>2016-03-15 16:15:38 +0100
committerJoel Rosdahl <joel@rosdahl.net>2016-07-19 15:02:34 +0200
commit72ddd9993836c89caf212e106aa8aeab4bb6521f (patch)
treeb58fe5a23f3ac56664bb6557625ccbe15a0de33c
parent96abf31ba752bb74592e1e8f2a43db61070c3f9c (diff)
downloadminiircd-72ddd9993836c89caf212e106aa8aeab4bb6521f.tar.gz
miniircd-72ddd9993836c89caf212e106aa8aeab4bb6521f.zip
Append new option --password-file
-rwxr-xr-xminiircd9
1 files changed, 9 insertions, 0 deletions
diff --git a/miniircd b/miniircd
index 2b295e9..e4c9379 100755
--- a/miniircd
+++ b/miniircd
@@ -649,6 +649,10 @@ class Server(object):
self.log_count = options.log_count
self.logger = None
+ if options.password_file:
+ with open(options.password_file, "r") as fo:
+ self.password = fo.read().strip("\n")
+
if self.ssl_pem_file:
self.ssl = __import__("ssl")
@@ -927,6 +931,11 @@ def main(argv):
metavar="X",
help="require connection password X; default: no password")
op.add_option(
+ "--password-file",
+ metavar="X",
+ help=("require connection password store in file X; "
+ "default: no password"))
+ op.add_option(
"--ports",
metavar="X",
help="listen to ports X (a list separated by comma or whitespace);"