tBKwtWS 7 жил өмнө
parent
commit
d9b0d8d4dd
1 өөрчлөгдсөн 5 нэмэгдсэн , 4 устгасан
  1. 5 4
      events/on_mode.py

+ 5 - 4
events/on_mode.py

@@ -52,11 +52,12 @@ def process_event(self, connection, event):
         if event.source.nick == connection.get_nickname() or self.channels[self.homechannel].is_owner(event.source.nick):
             return
         
-        # Stop if offender is atleast halfop in the home channel and offended is not owner.
-        if userstatus.atleast_halfop(self, event.source.nick, self.homechannel) and not self.channels[self.homechannel].is_owner(protectee):
-            return
-        
         for protectee in self.protectees:
+            
+            # Stop if offender is atleast halfop in the home channel and offended is not owner.
+            if userstatus.atleast_halfop(self, event.source.nick, self.homechannel) and not self.channels[self.homechannel].is_owner(protectee):
+                return
+            
             if behaviour == "passive":    # Passive behaviour.
                 return
             elif behaviour == "defense_only":   # Defensive only behaviour.