summary refs log tree commit diff
path: root/main.py
diff options
context:
space:
mode:
authormeltland <[email protected]>2025-03-15 13:32:57 -0400
committermeltland <[email protected]>2025-03-15 13:32:57 -0400
commit415c351e6ae2c1ada1b95b57f9ff5ee78ea5cad6 (patch)
tree2a3977bee8e667b81f383859087807538cf721f9 /main.py
parent50d0e4a7824f6cd825c17586bb8cfd7bc014debd (diff)
fix bans
Diffstat (limited to 'main.py')
-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"])