Pārlūkot izejas kodu

atleast_admin fix

tBKwtWS 8 gadi atpakaļ
vecāks
revīzija
28c299ac8c
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8 0
      common/userstatus.py

+ 8 - 0
common/userstatus.py

@@ -1,3 +1,11 @@
+def atleast_admin(self, user, channel):
+    if channel not in self.channels:
+        return False
+    if self.channels[channel].is_owner(user) or self.channels[channel].is_admin(user):
+        return True
+    else:
+        return False
+        
 def atleast_oper(self, user, channel):
     if channel not in self.channels:
         return False