Skip to content

feature: community servers report each map's final counts and name the map, so the panel can keep a map's last kills on that map - #281

Merged
lukepolo merged 3 commits into
mainfrom
feature/community-session-map
Nov 2, 2026
Merged

lukepolo merged 3 commits into
mainfrom
feature/community-session-map

Conversation

@Flegma

@Flegma Flegma commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Community servers now name the map in every sanction sync, and send the counts they had when a map ended in a sync of their own, before the roster holds through the map change.

The panel side is 5stackgg/api#883, which splits a community session into one stretch per map and mode. Without this PR that api change still works, with the map left empty. Without that api PR, this one is harmless: panels that predate per-map sessions ignore map, and the map-end report is an ordinary roster sync.

  • PlayerRoster.MapEnded snapshots the players, departures and map while the roster is known, and makes a sync due at once. Report sends that snapshot first; Delivered drops it once the panel records it.
  • A map-end report the panel refuses or misses is retried on the normal interval (not every poll), and given up after the hold cap (3 min) so it cannot hold up the reports after it.
  • The map comes from the map start/load event (OnMapStart on CSS, OnMapLoad on SwiftlyS2). On a hot reload, which misses that event, the plugin reads the current map once.
  • PlayerSanctionsRequest.map is optional; a blank name is sent as no map.

Known limits, documented on MapEnded: a map that ends before its own hold has settled has no roster to send, and a second map change while the first report is still undelivered replaces it. Either way those kills land on the next map, as they do today.

Tests: PlayerRosterTests covers the final report, its departures, resending a missed one, the retry pacing on a refusal (fails without the fix), the cap, an unknown roster and a blank map. 131/131 pass; both plugins build.

Reopened from a branch here, next to the api PRs (was #279).

…e map, so the panel can keep a map's last kills on that map

The roster sends the counts it had when a map ended in a sync of its
own, before it holds through the map change, and every sync names the
map. A map-end report the panel misses is sent again, and given up
after the hold cap so it cannot hold up the reports after it. Panels
that predate per-map sessions ignore the map.
…nd the map is read from the map load event

A roster that changed over the map change differed from the pending
report on every poll, so each poll became a sync until the report was
taken. The map name now comes with SwiftlyS2's map load event, and a
plugin only asks the engine for it on a hot reload, where it has missed
that event and the engine has a map to answer with.
…end report, and a kill during the hold stays out of it
@lukepolo
lukepolo merged commit f9e5d34 into main Nov 2, 2026
7 of 8 checks passed
@lukepolo
lukepolo deleted the feature/community-session-map branch November 2, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants