eric6/Network/IRC/IrcChannelWidget.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8259
2bbec88047dd
--- a/eric6/Network/IRC/IrcChannelWidget.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/Network/IRC/IrcChannelWidget.py	Sun Apr 11 18:45:10 2021 +0200
@@ -96,11 +96,10 @@
         """
         oper = privilege[0]
         priv = privilege[1]
-        if oper == "+":
-            if priv in IrcUserItem.PrivilegeMapping:
+        if priv in IrcUserItem.PrivilegeMapping:
+            if oper == "+":
                 self.__privilege |= IrcUserItem.PrivilegeMapping[priv]
-        elif oper == "-":
-            if priv in IrcUserItem.PrivilegeMapping:
+            elif oper == "-":
                 self.__privilege &= ~IrcUserItem.PrivilegeMapping[priv]
         self.__setIcon()
     
@@ -634,9 +633,8 @@
         """
         for patternRe, patternFunc in self.__patterns:
             match = patternRe.match(line)
-            if match is not None:
-                if patternFunc(match):
-                    return True
+            if match is not None and patternFunc(match):
+                return True
         
         return False
     

eric ide

mercurial