From 72ddd9993836c89caf212e106aa8aeab4bb6521f Mon Sep 17 00:00:00 2001 From: Jan Fuchs Date: Tue, 15 Mar 2016 16:15:38 +0100 Subject: Append new option --password-file --- miniircd | 9 +++++++++ 1 file changed, 9 insertions(+) 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") @@ -926,6 +930,11 @@ def main(argv): "-p", "--password", 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", -- cgit v1.2.3