Răsfoiți Sursa

atleast_admin fix

tBKwtWS 8 ani în urmă
părinte
comite
28c299ac8c
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  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