From 9f76de304fbe7d450d2c07f7f69ac231600f5007 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 2 Jul 2018 16:19:22 +0100 Subject: [PATCH] server.mode_prefixes is a dictionary --- IRCChannel.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/IRCChannel.py b/IRCChannel.py index 2cc40654..67eab2cd 100644 --- a/IRCChannel.py +++ b/IRCChannel.py @@ -29,7 +29,8 @@ class Channel(object): def remove_user(self, user): self.users.remove(user) for mode in self.modes[:]: - if mode in self.sever.mode_prefixes and user in self.modes[mode]: + if mode in self.sever.mode_prefixes.values( + ) and user in self.modes[mode]: self.modes[mode].discard(user) if not len(self.modes[mode]): del self.modes[mode] @@ -39,7 +40,7 @@ class Channel(object): if not mode in self.modes: self.modes[mode] = set([]) if args: - if mode in self.server.mode_prefixes: + if mode in self.server.mode_prefixes.values(): user = self.server.get_user(args) if user: self.modes[mode].add(user) @@ -51,7 +52,7 @@ class Channel(object): if not args: del self.modes[mode] else: - if mode in self.server.mode_prefixes: + if mode in self.server.mode_prefixes.values(): user = self.server.get_user(args) if user: self.modes[mode].discard(user)