mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
Merge origin/main into moderator-tools
The built client is main's here; it is rebuilt from the merged sources. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
d09ee94e16
33 files changed
+649
-230
No files matched your search
+8
-8
@@ -350,7 +350,7 @@ const gift = (account, body) => {
|
||||
if (body.kind === "adopt") {
|
||||
const ids = body.id === "all" ? defpacks.adoptAPetIds() : [body.id];
|
||||
const given = ids.filter(id => adopt.give(account, id)).length;
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return given ? {ok: `${name} has ${given} more on their Adopt-A-Pet checklist (it shows after their next login).`}
|
||||
: {error: "No such Adopt-A-Pet, or they already have it."};
|
||||
}
|
||||
@@ -383,7 +383,7 @@ const act = (account, body) => {
|
||||
// they cannot.
|
||||
case "unlock":
|
||||
account.locked = false;
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: `${name} is unlocked.`};
|
||||
// for a player who lost their phone and their recovery codes: their
|
||||
// password alone signs them in again.
|
||||
@@ -392,7 +392,7 @@ const act = (account, body) => {
|
||||
return {error: `${name} does not use 2FA.`};
|
||||
}
|
||||
totp.turnOff(account);
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: `2FA is off for ${name}.`};
|
||||
case "rename": {
|
||||
world.disconnect(account);
|
||||
@@ -415,7 +415,7 @@ const act = (account, body) => {
|
||||
return {error: "Pick a date and time in the past."};
|
||||
}
|
||||
account.lastSeen = when;
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: `${name} was last seen ${new Date(when * 1000).toISOString().replace("T", " ").slice(0, 16)} UTC, as far as the game knows.`};
|
||||
}
|
||||
// the adventure level of the animal they are using.
|
||||
@@ -433,7 +433,7 @@ const act = (account, body) => {
|
||||
return {error: "Unknown badge."};
|
||||
}
|
||||
badges.set(account, body.badges);
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
world.checkNameTag(account);
|
||||
return {ok: account.badges.length ? `${name} has: ${badges.of(account).map(badge => badge.label).join(", ")}.` : `${name} has no badges.`};
|
||||
}
|
||||
@@ -445,7 +445,7 @@ const act = (account, body) => {
|
||||
return {error: "Not a Discord username."};
|
||||
}
|
||||
account.discord = discord;
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: discord ? `Discord set to "${discord}".` : "Discord cleared."};
|
||||
}
|
||||
// their bio, which they otherwise write on the account page; empty
|
||||
@@ -456,7 +456,7 @@ const act = (account, body) => {
|
||||
return {error: `At most ${badges.MAX_BIO} characters on ${badges.MAX_BIO_LINES} lines.`};
|
||||
}
|
||||
account.bio = bio;
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: bio ? "Bio set." : "Bio cleared."};
|
||||
}
|
||||
case "ban": {
|
||||
@@ -496,7 +496,7 @@ const act = (account, body) => {
|
||||
if (body.on !== true) {
|
||||
modpanel.forget(account);
|
||||
}
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {ok: body.on === true
|
||||
? `${name} is a moderator.${totp.isOn(account) ? "" : " They have no 2FA yet and cannot sign in to the moderator panel until they turn it on."}`
|
||||
: `${name} is no longer a moderator.`};
|
||||
|
||||
Reference in new issue
Block a user