From d1fbbe0e2a74f71693f25d06a57551063447b87f Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 25 Nov 2017 19:20:23 +0000 Subject: [PATCH] Implement defaults --- example.json | 5 +++++ threshold | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/example.json b/example.json index 685e4fd..e7fe2ee 100644 --- a/example.json +++ b/example.json @@ -7,6 +7,11 @@ "UsePassword": true, "ConnectOnCreate": false, "Password": "s", + "Default": { + "password": null, + "username": null, + "authtype": null, + }, "Keywords": [], "Master": [] } diff --git a/threshold b/threshold index e2daafe..e26c8cd 100755 --- a/threshold +++ b/threshold @@ -583,14 +583,14 @@ class Helper(object): "bind": None, "timeout": 30, "nickname": spl[5], - "username": None, + "username": config["Default"]["username"], "realname": None, "userinfo": None, "finger": None, "version": None, "source": None, - "authtype": None, - "password": None, + "authtype": config["Default"]["authtype"], + "password": config["Default"]["password"], "authentity": "NickServ", "key": config["ListenerKey"], "certificate": config["ListenerCertificate"],