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

+71
View File
@@ -0,0 +1,71 @@
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.ScriptPack;
import com.jpexs.decompiler.flash.abc.avm2.parser.script.AbcIndexing;
import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScript3Parser;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import com.jpexs.decompiler.flash.tags.Tag;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
// adds empty classes to a swf, for `ffdec -replace` to fill in from swf-src/:
// -replace only replaces classes that are there already. each one is an empty
// "package x { public class Y {} }" compiled into the abc that holds the
// game's own classes (the way JPEXS's "Add class" does it); new method bodies
// go on the end, so the places tools/build-client.sh names stay as they are.
// a class the swf has already is left alone. run by tools/build-client.sh as
//
// java -cp tools/ffdec/lib/ffdec_lib.jar tools/AddClass.java <in.swf> <out.swf> <pkg.Class>...
//
// the way of doing it is Strawberry Jam's (scripts/patches/tool/PatchTool.java).
public class AddClass {
public static void main(String[] args) throws Exception {
SWF swf;
try (FileInputStream in = new FileInputStream(args[0])) {
swf = new SWF(in, false);
}
List<ABC> abcs = new ArrayList<>();
for (ABCContainerTag tag : swf.getAbcList()) {
abcs.add(tag.getABC());
}
Set<String> present = new HashSet<>();
ABCContainerTag container = null;
for (ABC abc : abcs) {
for (ScriptPack pack : abc.getScriptPacks(null, abcs)) {
String path = pack.getClassPath().toString();
present.add(path);
// the game's classes all sit in one abc; new ones go beside them
if (container == null && path.equals("AJClient")) {
container = abc.parentTag;
}
}
}
if (container == null) {
throw new IllegalStateException("no AJClient class in " + args[0]);
}
for (int i = 2; i < args.length; i++) {
String fqcn = args[i];
if (present.contains(fqcn)) {
continue;
}
int dot = fqcn.lastIndexOf('.');
String pkg = dot < 0 ? "" : fqcn.substring(0, dot);
String cls = fqcn.substring(dot + 1);
AbcIndexing index = swf.getAbcIndex();
index.selectAbc(container.getABC());
ActionScript3Parser parser = new ActionScript3Parser(index);
parser.addScript("package " + pkg + " { public class " + cls + " { } }", fqcn.replace('.', '/'), 0, 0, swf.getDocumentClass(), container.getABC());
((Tag) container).setModified(true);
swf.clearAllCache();
swf.setModified(true);
System.out.println("added class " + fqcn);
}
try (FileOutputStream out = new FileOutputStream(args[1])) {
swf.saveTo(out);
}
}
}
+35 -3
View File
@@ -12,6 +12,12 @@
# decompiler gets two of that class's functions wrong, so the class cannot
# be compiled from its source. 4839 is that method body's place in the
# untouched client.
#
# gui.BulletinBoard cannot be compiled from its source either (its media
# callback comes out as loops that do not do what the bytecode does), so two
# of its methods are replaced as P-code: the tutorial and "what's new" video
# lists return at once when empty, as this server sends them (they threw).
# 3830 and 3832 are those method bodies' places in the untouched client.
set -e
cd "$(dirname "$(readlink -f "$0")")/.."
out=${1:-swf/ajclient.swf}
@@ -52,13 +58,39 @@ set -- \
avatar.AvatarWorldView AvatarWorldView.as \
room.RoomManagerWorld RoomManagerWorld.as \
gskinner.motion.GTween GTween.as \
playerWall.PostMessage PostMessage.as
playerWall.PostMessage PostMessage.as \
shop.BundleShop BundleShop.as \
gui.GenericListGuiManager GenericListGuiManager.as \
gui.DenSwitcher DenSwitcher.as \
gui.PetCreator PetCreator.as \
gui.NGFactManager NGFactManager.as \
game.distanceChallenge.DistanceChallenge DistanceChallenge.as \
buddy.BuddyList BuddyList.as \
Party.PartyPopup PartyPopup.as \
gui.ECardInbox ECardInbox.as \
game.SoundManager SoundManager.as \
com.sbi.graphics.LayerAnim LayerAnim.as \
com.sbi.graphics.LayerBitmap LayerBitmap.as \
ecard.ECard ECard.as \
game.ArtStudioKit ArtStudioKit.as \
game.artStudioPainting.ArtStudioPainting ArtStudioPainting.as \
game.artStudioGridDrawing.ArtStudioGridDrawing ArtStudioGridDrawing.as
# not in the game: added before the replace (game.ArtStudioKit is Strawberry
# Jam's, shared by its two art studio painters)
NEW_CLASSES="game.ArtStudioKit"
args=""
while [ $# -gt 0 ]; do
args="$args $1 swf-src/$2"
shift 2
done
# classes the game never had (NEW_CLASSES) are added empty first
# (tools/AddClass.java), for the replace to fill in from swf-src/
base=$(mktemp --suffix=.swf)
trap 'rm -f "$base"' EXIT
java -cp "tools/ffdec/lib/*" tools/AddClass.java swf/ajclient.before-finder.swf "$base" $NEW_CLASSES
# shellcheck disable=SC2086
java -jar tools/ffdec/ffdec-cli.jar -replace swf/ajclient.before-finder.swf "$out" \
gui.EmoticonUtility swf-src/EmoticonUtility.cinit.pcode 4839 $args | grep -v "^Replac\|EXPERIMENTAL" || true
java -jar tools/ffdec/ffdec-cli.jar -replace "$base" "$out" \
gui.EmoticonUtility swf-src/EmoticonUtility.cinit.pcode 4839 \
gui.BulletinBoard swf-src/BulletinBoard.onTutorialGLReceived.pcode 3830 \
gui.BulletinBoard swf-src/BulletinBoard.onWhatsNewVideosLoaded.pcode 3832 $args | grep -v "^Replac\|EXPERIMENTAL" || true
ls -l "$out"