feat: stats graphs, playtime, ip search against ban evasion, 150-char chat

- stats graphs for the admin and moderator panels (lib/stats.js, public/stats-view.html)
- playtime, private unless shown on the card's bio tab; set on the account page
- search accounts by ip address, only against ban evasion; mods see no addresses and each search is logged
- privacy policy for the above (terms version 2026-10-17)
- the per-second save looks only at accounts in play, with a slow sweep of the rest
- items in several dens at once; chat filter hides slurs and threats by default
- sexual usernames refused; moderators may enter full rooms; guide login allowed
- 150-character chat box (client build 55)
- fixes: gifts, trades, dens, pets in dens, den recycling, special animals' colours,
  jammer walls, settings switches; the buddy list sent at login
- the item giver, the rules screen and the art studio rework
This commit is contained in:
Burrowdev committed 2026-10-17 02:00:57 +03:00
1 parent 8400d2f928
commit 04f468af2c
56 files changed
+25667 -3894

No files matched your search

+9 -1
View File
@@ -73,6 +73,14 @@ module.exports = ({findOnline, blocks}) => {
// kept by the name on them.
const senderOf = card => (card.fromId ? accounts.byId(card.fromId) : accounts.byName(card.from));
// the card's gift id: for clothing the id of its picture (ECardInbox hands
// it to SimpleIcon as an accId, which is the def's layerDefId), for the
// rest the def id or the amount.
const giftId = gift => {
const def = gift.type === TYPE_CLOTHING && defpacks.itemDef(gift.def);
return def ? Number(def.layerDefId) : gift.def;
};
// the 17 fields ECard.init takes, for one card. A secret valentine's
// sender is known here (reports about it reach them) but not sent.
const fields = card => {
@@ -81,7 +89,7 @@ module.exports = ({findOnline, blocks}) => {
const name = card.secret ? "" : senderType === FROM_HQ ? HQ_NAME_STRING : card.hq ? HQ_NAME : card.from;
return [
card.id, name, card.card, card.stamp, card.read ? 1 : 0, card.msg, card.gift ? card.gift.type : TYPE_PLAIN,
card.gift ? card.gift.def : 0, card.gift ? card.gift.color : 0, card.gift ? card.gift.name : 0,
card.gift ? giftId(card.gift) : 0, card.gift ? card.gift.color : 0, card.gift ? card.gift.name : 0,
card.hq || card.secret ? MEMBER : sender ? sender.accountType : 0,
0, // name bar data
0, // secondary type