mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
conf: re-add dummy conf / confname so that dependant modules are still importable
This commit is contained in:
parent
5a363c22af
commit
2c0a09271c
28
conf.py
28
conf.py
@ -11,6 +11,34 @@ from collections import defaultdict
|
|||||||
|
|
||||||
from . import world
|
from . import world
|
||||||
|
|
||||||
|
conf = {'bot':
|
||||||
|
{
|
||||||
|
'nick': 'PyLink',
|
||||||
|
'user': 'pylink',
|
||||||
|
'realname': 'PyLink Service Client',
|
||||||
|
'serverdesc': 'Unconfigured PyLink'
|
||||||
|
},
|
||||||
|
'logging':
|
||||||
|
{
|
||||||
|
'stdout': 'INFO'
|
||||||
|
},
|
||||||
|
'servers':
|
||||||
|
# Wildcard defaultdict! This means that
|
||||||
|
# any network name you try will work and return
|
||||||
|
# this basic template:
|
||||||
|
defaultdict(lambda: {'ip': '0.0.0.0',
|
||||||
|
'port': 7000,
|
||||||
|
'recvpass': "unconfigured",
|
||||||
|
'sendpass': "unconfigured",
|
||||||
|
'protocol': "null",
|
||||||
|
'hostname': "pylink.unconfigured",
|
||||||
|
'sid': "000",
|
||||||
|
'maxnicklen': 20,
|
||||||
|
'sidrange': '0##'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
confname = 'unconfigured'
|
||||||
|
|
||||||
def validateConf(conf):
|
def validateConf(conf):
|
||||||
"""Validates a parsed configuration dict."""
|
"""Validates a parsed configuration dict."""
|
||||||
assert type(conf) == dict, "Invalid configuration given: should be type dict, not %s." % type(conf).__name__
|
assert type(conf) == dict, "Invalid configuration given: should be type dict, not %s." % type(conf).__name__
|
||||||
|
Loading…
Reference in New Issue
Block a user