From 48831863d2cef8cc39599427bc6829eed5f3b205 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 28 Sep 2015 19:22:19 -0700 Subject: [PATCH] validateConf: allow autojoin channels to be empty; nothing wrong with that --- conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.py b/conf.py index 73ac8f0..1d01490 100644 --- a/conf.py +++ b/conf.py @@ -39,9 +39,9 @@ def validateConf(conf): assert conf.get(section), "Missing %r section in config." % section for netname, serverblock in conf['servers'].items(): for section in ('ip', 'port', 'recvpass', 'sendpass', 'hostname', - 'sid', 'sidrange', 'channels', 'protocol', 'maxnicklen'): + 'sid', 'sidrange', 'protocol', 'maxnicklen'): assert serverblock.get(section), "Missing %r in server block for %r." % (section, netname) - assert type(serverblock['channels']) == list, "'channels' option in " \ + assert type(serverblock.get('channels')) == list, "'channels' option in " \ "server block for %s must be a list, not %s." % (netname, type(serverblock['channels']).__name__) assert type(conf['login'].get('password')) == type(conf['login'].get('user')) == str and \ conf['login']['password'] != "changeme", "You have not set the login details correctly!"