mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
core: make maxnicklen optional, defaulting it to 30
This commit is contained in:
parent
f458a40e1c
commit
e4b400042e
@ -146,9 +146,8 @@ class Irc():
|
||||
|
||||
# This max nick length starts off as the config value, but may be
|
||||
# overwritten later by the protocol module if such information is
|
||||
# received. Note that only some IRCds (InspIRCd) give us nick length
|
||||
# during link, so it is still required that the config value be set!
|
||||
self.maxnicklen = self.serverdata['maxnicklen']
|
||||
# received. It defaults to 30.
|
||||
self.maxnicklen = self.serverdata.get('maxnicklen', 30)
|
||||
|
||||
# Defines a list of supported prefix modes.
|
||||
self.prefixmodes = {'o': '@', 'v': '+'}
|
||||
|
2
conf.py
2
conf.py
@ -48,7 +48,7 @@ def validateConf(conf):
|
||||
|
||||
for netname, serverblock in conf['servers'].items():
|
||||
for section in ('ip', 'port', 'recvpass', 'sendpass', 'hostname',
|
||||
'sid', 'sidrange', 'protocol', 'maxnicklen'):
|
||||
'sid', 'sidrange', 'protocol'):
|
||||
assert serverblock.get(section), "Missing %r in server block for %r." % (section, netname)
|
||||
|
||||
assert type(conf['login'].get('password')) == type(conf['login'].get('user')) == str and \
|
||||
|
Loading…
Reference in New Issue
Block a user