ircdb: Fix 'IrcUser.nicks' on non-lowercase network names

This dict was filled with IrcString keys, which is hashed
as lowercase, so when queried with a non-lowercase string,
the key would not be found, and lead to very confusing errors.
This commit is contained in:
Valentin Lorentz 2021-05-24 17:21:43 +02:00
parent 04facade82
commit d91303271d

View File

@ -218,7 +218,8 @@ class IrcUser(object):
else: else:
self.hostmasks = hostmasks self.hostmasks = hostmasks
if nicks is None: if nicks is None:
self.nicks = {} # {'network1': ['foo', 'bar'], 'network': ['baz']} # {'network1': ['foo', 'bar'], 'network': ['baz']}
self.nicks = ircutils.IrcDict()
else: else:
self.nicks = nicks self.nicks = nicks
self.gpgkeys = [] # GPG key ids self.gpgkeys = [] # GPG key ids