tBKwtWS 7 жил өмнө
parent
commit
18f307d0cf

+ 1 - 0
events/common.py

@@ -1,5 +1,6 @@
 import random
 from common import userstatus
+
 class Protectees():
     def update(self, nick, user, host):
         if nick in self.protectees: # On record.

+ 3 - 3
events/on_mode.py

@@ -53,9 +53,9 @@ def process_event(self, connection, event):
             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
-                
+        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:
             if behaviour == "passive":    # Passive behaviour.
                 return

+ 1 - 0
events/on_nick.py

@@ -9,6 +9,7 @@ def process_event(self, connection, event):
         log.info("Assuming original nick.")
         NickServ.recover_nick(connection, self.password)
     
+    # Update protectees.
     if event.source.nick in self.protectees:    # Protectee chaning nick.
         del self.protectees[event.source.nick]  # Remove old nick from list.
         connection.who(event.target)    # Get whorepy to add new nick to protectees.