From 33034b23f1e4a3d2eacb4f9b0936760525275b26 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 14 May 2016 11:58:22 -0700 Subject: [PATCH] Irc.applyModes: assume modes are being added if no +/- is given --- classes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classes.py b/classes.py index beb73ae..f3c8589 100644 --- a/classes.py +++ b/classes.py @@ -639,7 +639,7 @@ class Irc(): 'it\'s a prefix mode.', self.name, str(mode)) continue - if mode[0][0] == '+': + if mode[0][0] != '-': # We're adding a mode existing = [m for m in modelist if m[0] == real_mode[0] and m[1] != real_mode[1]] if existing and real_mode[1] and real_mode[0] not in self.cmodes['*A']: @@ -663,7 +663,6 @@ class Irc(): if oldmode[0] == real_mode[0]: modelist.discard(oldmode) else: - # Swap the - for a + and then remove it from the list. modelist.discard(real_mode) log.debug('(%s) Final modelist: %s', self.name, modelist) if usermodes: