diff --git a/src/ircdb.py b/src/ircdb.py index 71d5900f5..c46c46ab4 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -786,9 +786,21 @@ def getUserId(self, s): elif len(ids) == 0: raise KeyError(s) else: - log.error('Multiple matches found in user database. ' - 'Removing the offending hostmasks.') + # values in 'ids' are strings if user was identified by + # actual hostmask, or True if they were identified by + # a transient authentication (@identify, NickAuth, GPG, + # etc.) + log.error( + 'Multiple matches found in user database: [%s]. ' + 'Removing the offending hostmasks.', + ', '.join( + '' + if hostmask is True + else repr(hostmask) + for hostmask in ids.values())) for (id, hostmask) in ids.items(): + if hostmask is True: + continue log.error('Removing %q from user %s.', hostmask, id) self.users[id].removeHostmask(hostmask) raise DuplicateHostmask('Ids %r matched.' % ids)