[Server] Recursive alt search with match evidence

getUserAlts() now walks a breadth-first graph to the requested depth (clamped 1-3): each level expands frontier accounts over registration email, current client id, recent session IPs (6-month window), and historic session client ids, so identifier changes no longer hide older alts. Every row carries match_reason (email / clientid:<id> / ip:<addr>), depth, and shared_count fan-out so moderators can distinguish real alts from VPN/shared-network overlap. Command_GetUserAlts depth is plumbed through; unset depth defaults to 1, preserving previous single-hop behavior for old clients.
This commit is contained in:
Lukas Brübach 2026-10-13 20:08:25 +02:00
parent 5e1aab2492
commit 6b1bcc2caf
3 changed files with 343 additions and 52 deletions

View file

@ -2595,7 +2595,8 @@ Response::ResponseCode AbstractServerSocketInterface::cmdGetUserAlts(const Comma
}
Response_UserAlts *re = new Response_UserAlts;
const QList<ServerInfo_UserAlt> alts = sqlInterface->getUserAlts(userName);
const int depth = cmd.has_depth() ? static_cast<int>(cmd.depth()) : 1;
const QList<ServerInfo_UserAlt> alts = sqlInterface->getUserAlts(userName, depth);
for (const ServerInfo_UserAlt &alt : alts) {
re->add_alts()->CopyFrom(alt);
}