summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index 76ea084..dfb975f 100644
--- a/main.py
+++ b/main.py
@@ -368,7 +368,7 @@ async def handler(websocket):
                 if "KICK" not in db.acc.get_perms(username):

                     await websocket.send(util.error("unauthorized", listener))

                     continue

-                if "PROTECTED" not in db.acc.get_perms(r["username"].lower()):

+                if "PROTECTED" in db.acc.get_perms(r["username"].lower()):

                     await websocket.send(util.error("unauthorized", listener))

                     continue

                 try:

@@ -390,7 +390,7 @@ async def handler(websocket):
                     await websocket.send(util.error("unauthorized", listener))

                     continue

                 r["username"] = r["username"].lower()

-                if "PROTECTED" not in db.acc.get_perms(r["username"]):

+                if "PROTECTED" in db.acc.get_perms(r["username"]):

                     await websocket.send(util.error("unauthorized", listener))

                     continue

                 ac = db.acc.edit({"banned_until": r["banned_until"]}, r["username"])