From d509ca03b22842116ebd197931fdcf509aef2108 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 7 Oct 2022 13:19:06 +1000 Subject: Allow gods to reject account requests. Also disable and ban bits, though not fully implemented. --- src/sledjchisl/sledjchisl.c | 54 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) (limited to 'src/sledjchisl') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index c02cba9..64ae6a3 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -5918,6 +5918,8 @@ static void accountWrite(reqData *Rd) if (!writeLuaString (Rd, fd, file, "vouched", "off")) goto notWritten; if (!writeLuaString (Rd, fd, file, "voucher", NULL)) goto notWritten; if (!writeLuaString (Rd, fd, file, "approver", NULL)) goto notWritten; + if (!writeLuaString (Rd, fd, file, "banner", NULL)) goto notWritten; + if (!writeLuaString (Rd, fd, file, "reason", NULL)) goto notWritten; if (!writeLuaString (Rd, fd, file, "link", link)) goto notWritten; l = strlen(end); if (l != writeall(fd, end, l)) @@ -7078,6 +7080,8 @@ static void accountViewWeb(reqData *Rd, inputForm *oF, inputValue *oV) *email = getStrH(Rd->database, "UserAccounts.Email"), *voucher = getStrH(Rd->database, "Lua.voucher"), *approver = getStrH(Rd->database, "Lua.approver"), + *banner = getStrH(Rd->database, "Lua.banner"), + *reason = getStrH(Rd->database, "Lua.reason"), *about = getStrH(Rd->database, "Lua.aboutMe"); time_t crtd = atol(getStrH(Rd->database, "UserAccounts.Created")); @@ -7091,6 +7095,8 @@ static void accountViewWeb(reqData *Rd, inputForm *oF, inputValue *oV) Rd->reply->addstrf(Rd->reply, "
UUID : %s
", getStrH(Rd->database, "UserAccounts.PrincipalID")); Rd->reply->addstrf(Rd->reply, "Voucher : %s
", voucher); Rd->reply->addstrf(Rd->reply, "Approver : %s
", approver); + Rd->reply->addstrf(Rd->reply, "Banner : %s
", banner); + Rd->reply->addstrf(Rd->reply, "Reason : %s
", reason); HTMLtextArea(Rd->reply, "aboutMe", "About", 7, 50, 4, 16384, "", "off", "true", "soft", about, FALSE, TRUE); accountWebSubs(Rd, oF); accountWebFooter(Rd, oF); @@ -7103,6 +7109,8 @@ static void accountEditWeb(reqData *Rd, inputForm *oF, inputValue *oV) *email = getStrH(Rd->database, "UserAccounts.Email"), *voucher = getStrH(Rd->database, "Lua.voucher"), *approver = getStrH(Rd->database, "Lua.approver"), + *banner = getStrH(Rd->database, "Lua.banner"), + *reason = getStrH(Rd->database, "Lua.reason"), *about = getStrH(Rd->database, "Lua.aboutMe"), *lvl = getLevel(atoi(level)); short lv = atoi(level); @@ -7119,11 +7127,13 @@ static void accountEditWeb(reqData *Rd, inputForm *oF, inputValue *oV) HTMLtextArea(Rd->reply, "aboutMe", "About", 7, 50, 4, 16384, "", "off", "true", "soft", about, FALSE, TRUE); Rd->reply->addstrf(Rd->reply, "Voucher : %s
", voucher); - if (200 <= Rd->shs.level) + if (200 <= Rd->shs.level) // Only gods can change level for accounts. { qlisttbl_obj_t obj; HTMLhidden(Rd->reply, "approver", approver); + HTMLhidden(Rd->reply, "banner", banner); + HTMLhidden(Rd->reply, "reason", reason); HTMLselect(Rd->reply, "level", "level"); memset((void*)&obj, 0, sizeof(obj)); // must be cleared before call accountLevels->lock(accountLevels); @@ -7135,14 +7145,25 @@ static void accountEditWeb(reqData *Rd, inputForm *oF, inputValue *oV) if (strcmp(lvl, (char *) obj.data) == 0) is = true; -// if ((is) || ((l <= Rd->shs.level) && (l != -200) && (l != -100) && (l != -50))) // Not above our pay grade, not newbie, validated, nor vouched for. - if ((is) || ((l <= Rd->shs.level) && (lv <= l))) // As per discussions, can't lower level. Do that in the console. +/* "-256", "banned"); + "-240", "rejected"); + "-230", "disabled"); + "-200", "newbie"); + "-100", "validated"); + "-50", "vouched for"); + "0", "approved"); // Note that http://opensimulator.org/wiki/Userlevel claims that 1 and above are "GOD_LIKE". + "200", "god"); +*/ + if ((is) || ((l <= Rd->shs.level) && (l != -200) && (l != -100) && (l != -50) && (strcmp("-256", (char *) obj.name) != 0) )) // Not above our pay grade, not newbie, validated, nor vouched for. Also skip banned. +// if ((is) || ((l <= Rd->shs.level) && (lv <= l))) // As per discussions, can't lower level. Do that in the console. NOTE: No one can recall those discussions. lol HTMLoption(Rd->reply, (char *) obj.data, is); } accountLevels->unlock(accountLevels); HTMLselectEnd(Rd->reply); Rd->reply->addstrf(Rd->reply, "