mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat: discord linking, @tags, music and sfx sliders, required device ids
- Discord: the account page links a player's Discord account through Discord's sign-in (lib/discord.js); only linked names are shown on cards (typed ones are cleared). A bot keeps the Server Booster badge on linked accounts that boost. The game tells the client where the player is, for the client's Discord rich presence (flashvars discordAppId). - @username tags in chat, chat balloons and wall posts: only real players' names (asked of the server, "xmn"), names with spaces too, drawn on a blue box; a click opens the player's card. - Settings: separate Music and SFX volume sliders for the old one. - Device ids required: a launcher that sends none (before 1.3.0) is told at the game's login "Your client is outdated. Update at https://burrow.moe/download". AJ_REQUIRE_DEVICE=0 turns it off. - Panels: clear a player's Jammer Wall posts; turning away masterpieces and player items asks first. - Item Giver: negative colour ids (the same colour written signed). - buildVersion 71; the client rebuilt with Snipzil's sitting fix.
This commit is contained in:
1 parent
1d9b70f32e
commit
33f56074a4
35 files changed
+2076
-101
No files matched your search
+22
-1
@@ -397,4 +397,25 @@ const forget = account => {
|
||||
db().prepare("DELETE FROM device_alerts WHERE account_id = ?").run(account.id);
|
||||
};
|
||||
|
||||
module.exports = {load, read, banOf, banOfAccount, seen, alts, knownFor, banAccount, accountsUnder, unban, list, idsFor, bansOfAccount, search, bannedId, alerts, alertsOf, forget, clientHash};
|
||||
// sign-in tokens last given to (or brought back by) a launcher that sent no
|
||||
// device ids: one from before 1.3.0, or not ours. with config.requireDevice
|
||||
// its sign-in still goes through, so that the game loads and its own login
|
||||
// popup can say to update (lib/world.js), which a refused sign-in cannot.
|
||||
// kept by hash, in memory: such a launcher signs in again each time it starts.
|
||||
const MAX_OUTDATED = 20000;
|
||||
const outdatedTokens = new Set();
|
||||
const tokenKey = token => crypto.createHash("sha256").update(String(token)).digest("hex");
|
||||
const noteLauncher = (token, hasIds) => {
|
||||
const key = tokenKey(token);
|
||||
if (hasIds) {
|
||||
outdatedTokens.delete(key);
|
||||
return;
|
||||
}
|
||||
if (outdatedTokens.size >= MAX_OUTDATED) {
|
||||
outdatedTokens.delete(outdatedTokens.values().next().value);
|
||||
}
|
||||
outdatedTokens.add(key);
|
||||
};
|
||||
const launcherOutdated = token => outdatedTokens.has(tokenKey(token));
|
||||
|
||||
module.exports = {noteLauncher, launcherOutdated, load, read, banOf, banOfAccount, seen, alts, knownFor, banAccount, accountsUnder, unban, list, idsFor, bansOfAccount, search, bannedId, alerts, alertsOf, forget, clientHash};
|
||||
Reference in new issue
Block a user