mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53:25 -08:00
[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:
parent
5e1aab2492
commit
6b1bcc2caf
3 changed files with 343 additions and 52 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue