Repository navigation
Kick a player or everyone, and raise announcements and direct messages for the server's resources, in contract 5 - #58
Merged
Conversation
…ssages for the server's resources, in bridge contract 5
…ofile or the map, and announce or kick everyone from the top bar
…e kick message they read
…erver runs, when the owner asks for txAdmin's events
…e server runs, when the owner asks for txAdmin's events
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The staff can kick a connected player from the Online now column, from their profile or from the live map, and kick everyone from the top bar. The player reads the kick message the owner writes in the settings, which can quote the reason, as a banned player reads the refusal message. Announcements and direct messages are raised for the server's resources as
observer:announcementandobserver:directMessage: Observer shows players nothing of them, a resource does. With Send txAdmin's events too, the bridge also raises txAdmin's matching events, and nowtxAdmin:events:playerBannedandtxAdmin:events:actionRevokedfor each ban made or lifted. Each action has its permission and its audit entry. The bridge contract goes to version 5.What changed
observer-domain:moderation(DTOsKickRequest,KickAllRequest,KickedAll,AnnouncementRequest,DirectMessageRequest,KickSettings; the kick message with{reason}and{by}, 600 characters, rendered to 700 bytes at most; announcements and messages of 400 characters, lines kept, hidden characters removed).bans::clean_messageandbans::fillnow serve both messages. Permission bits 29PLAYERS_KICK, 30PLAYERS_ANNOUNCE, 31PLAYERS_MESSAGE. Audit actionsplayer_kicked,everyone_kicked,kick_settings_changed,announcement_sent,direct_message_sent. Error codesplayer_not_connected,invalid_kick,invalid_kick_settings,invalid_message.observer-store: the settingkicks.message(no migration), andbans::held, what a ban holds.observer-fxserver: contract 5. EventsannouncementanddirectMessage. Actionskick(the players listed, split over as many console lines as the list needs, or everyone, as the server counts them when it runs the action),bannedandlifted(txAdmin's ban events only).BridgeAction::fittedcuts any of an action's texts, and a txAdmin ban event's hardware tokens, then its identifiers, first.observer-app: theModerationservice (kick, kick everyone, announce, message, the kick message). It refuses a stopped server (server_not_running) and a player the bridge does not list, or lists under another licence (player_not_connected): server ids start again from 1 after a restart.kick_players(targets, kick)kicks a list or everyone with a cause and a rendered message, and checks and audits nothing, for the allowlist and the maintenance mode to come.Bans::connected_players.Banstells txAdmin's listeners of each ban made, before it drops anyone, and of each ban lifted, only when the saved launch settings ask for txAdmin's events.observer-web:POST /servers/default/kicks,POST /servers/default/kicks/all(SERVER_CONTROL, as txAdmin gates it),GET|PUT /servers/default/kicks/settings(SETTINGS_VIEW, thenSETTINGS_MANAGEand the password again),POST /servers/default/announcements,POST /servers/default/messages.server.lua): thekickaction raisesobserver:playerKickedfor every player first, then drops them;bannedandliftedraisetxAdmin:events:playerBannedandtxAdmin:events:actionRevokedwhenobserver_txadmin_eventsis 1;TXADMINmaps the new events.CONTRACT.md: the Kicks and the Announcements and messages sections, the txAdmin table, a security note on the staff's text.observer_examplehandles the three new events.kickaction printsobserver:playerKicked, thenkicked <id> "<message>", and drops with category 1, the bridge as the resource; txAdmin's ban events are printed whenobserver_txadmin_eventsis 1.Notes for review
DROP_PLAYERdoes nothing for a server id without a client and does not drop a client still connecting;GetPlayers()lists only connected clients; server ids count up from 1 and start again after a restart, hence the licence each kick and message carries.observer:playerKickedof a kick is raised before its first drop. With txAdmin's events,txAdmin:events:playerKickedfollows each player's event, or comes once withtarget = -1for a kick of everyone, as txAdmin does.playerBannedonce per ban, when it is made; the bridge does the same, before the players the ban drops hearobserver:playerBanned. A lifted ban has no event of Observer's own.mainin; its audit actions come after theirs. Branches under way that took bits up to 31 renumber after these, as do contracts 6 and 7 after 5. The owner's permissions incrates/observer-web/src/tests.rs("ffffffff") and the masks the moderation tests write in hexadecimal, incrates/observer-web/src/tests/moderation.rsand the panel'sOnlineColumn.test.tsxandServerControls.test.tsx, change with each bit.mainmerged in four times, for Run the fake FXServer tests on ports the system gives, so that two runs on one host no longer collide #56, Follow the server's resources on a Resources page, and start, stop, restart or rescan them #57, Show the integration contract in the panel, on a Documentation page drawn from the file the binary ships #59 and List the server's entities, draw them on the live map and delete them a hundred at a time #61. The Documentation page of Show the integration contract in the panel, on a Documentation page drawn from the file the binary ships #59 drawsCONTRACT.mdas this build ships it, so version 5's sections show there, and its tests pass with them. With List the server's entities, draw them on the live map and delete them a hundred at a time #61 the bridge takes eight actions, the entities' two among them:fittedleaves those two alone, as List the server's entities, draw them on the live map and delete them a hundred at a time #61 did.Verified
mainmerged in:cargo xtask checkin one run (fmt, icons, clippy with and withoutobserver/test-catalog,cargo test --workspace, bindings unchanged, the panel's format, lint, type check, tests and build).observer:playerKicked; a kick or a message for a server id another licence holds now is refused; kick everyone; the announcement and direct message events; txAdmin's ban events with the option on, and nothing written with it off.cargo xtask icons --check, the build withobserver/test-catalog, Playwright on Chromium): 12 passed, and the 2 flows that run on Linux only were skipped, among them the new "the staff writes to a player from the players column, then kicks them with the kick message".Not verified
kick,bannedandliftedactions, the three new events and txAdmin's five.cfg(unix)orcfg(windows)code changed here, and nothing was built or run on Linux.