Browse Source

atleast_admin fix

tBKwtWS 8 năm trước cách đây
mục cha
commit
28c299ac8c
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  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