IRCChannel.modes isn't a list, "sever" -> "server"

This commit is contained in:
jesopo 2018-07-02 16:34:29 +01:00
parent 29c55246b0
commit e17bb692f2

View file

@ -28,8 +28,8 @@ class Channel(object):
self.users.add(user) self.users.add(user)
def remove_user(self, user): def remove_user(self, user):
self.users.remove(user) self.users.remove(user)
for mode in self.modes[:]: for mode in list(self.modes.keys()):
if mode in self.sever.mode_prefixes.values( if mode in self.server.mode_prefixes.values(
) and user in self.modes[mode]: ) and user in self.modes[mode]:
self.modes[mode].discard(user) self.modes[mode].discard(user)
if not len(self.modes[mode]): if not len(self.modes[mode]):