diff --git a/src/ircdb.py b/src/ircdb.py index d5462038c..76ed3e4e2 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -297,10 +297,7 @@ class UsersDictionary(object): for (name, user) in self.dict.iteritems(): if user.checkHostmask(s): self.cache[s] = name - if name in self.revcache: - self.revcache[name].append(s) - else: - self.revcache[name] = [s] + self.revcache.setdefault(name,[]).append(s) return name raise KeyError, s