From aa95418b7074effb4ea000dc5eb862a887fa2707 Mon Sep 17 00:00:00 2001 From: mid <> Date: Mon, 5 Aug 2024 22:08:19 +0300 Subject: [PATCH] No logging in as administator & moderator in anarchy mode --- login.html.l | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/login.html.l b/login.html.l index 8aa7e7d..51ec849 100644 --- a/login.html.l +++ b/login.html.l @@ -19,9 +19,15 @@ worked = false end - if worked and BigGlobe.cfg.anarchy == "ANARCHY" then - response:addHeader("Refresh", "3;url=" .. zzz) - response:statusCode(303) + if BigGlobe.cfg.anarchy == "ANARCHY" then + if u and u.privs > DB.USER_PRIVS_APPROVED then + worked = false + end + + if worked then + response:addHeader("Refresh", "3;url=" .. zzz) + response:statusCode(303) + end end end @@ -30,9 +36,13 @@ {% function content() %} {% if BigGlobe.cfg.anarchy == "ANARCHY" then %} -

In anarchy mode, anyone can be anything. Please wait..

- -

If that doesn't work, click here.

+ {% if worked and zzz then %} +

In anarchy mode, anyone can be anything. Please wait..

+ +

If that doesn't work, click here.

+ {% else %} +

User doesn't exist.

+ {% end %} {% else %} {% if worked then %}

Link has been sent to {{ em and Escapes.htmlescape(em) }}. This page may be closed.

@@ -42,4 +52,4 @@ {% end %} {% end %} -{# base.inc \ No newline at end of file +{# base.inc