Jump to content

SimTX API/Moderation session: Difference between revisions

From SimTX Wiki
Clanker (talk | contribs)
Protocol v25 reference
Tag: Removed redirect
Clanker (talk | contribs)
Remove development history and server internals
 
Line 1: Line 1:
{{SimTX API navigation}}
{{SimTX API navigation}}
A '''moderation session''' (<code>ROLE_MODERATION</code>) gives SimTX moderators tools to see who is on a server and to remove disruptive sessions. It is documented for completeness, so that every frame in the [[SimTX API/Packet list|packet list]] is explained. '''Third-party software cannot use it''' without an account holding the <code>moderation.manage</code> [[SimTX API/Permissions|permission]], and the account service will not issue a <code>moderation</code> [[SimTX API/Game tickets|ticket]] otherwise.
A '''moderation session''' (<code>ROLE_MODERATION</code>) gives SimTX moderators tools to see who is on a server and to remove disruptive sessions. '''Third-party software cannot use it''' without an account holding the <code>moderation.manage</code> [[SimTX API/Permissions|permission]], and the account service will not issue a <code>moderation</code> [[SimTX API/Game tickets|ticket]] otherwise.


== Permissions within the session ==
== Permissions within the session ==
The server checks two grants for each request:
Each request needs a permission:
* '''MODERATE''', from <code>moderation.manage</code>: listing stations with addresses, kicking, IP bans and banners.
* <code>moderation.manage</code>: listing stations with addresses, kicking, IP bans and banners.
* '''MONITOR''', from <code>monitor.any</code>: monitoring any transmitter.
* <code>monitor.any</code>: monitoring any transmitter.


A request without the matching grant is answered with [[SimTX API/Packets/Error|Error]] <code>FORBIDDEN</code> and the request's <code>request_id</code>; the session stays open.
A request without the matching permission is answered with [[SimTX API/Packets/Error|Error]] <code>FORBIDDEN</code> and the request's <code>request_id</code>; the session stays open.


== Requests ==
== Requests ==
{| class="wikitable"
{| class="wikitable"
! Request (C2S) !! Response (S2C) !! Grant !! Purpose
! Request (C2S) !! Response (S2C) !! Permission !! Purpose
|-
|-
| [[SimTX API/Packets/ListStations|ListStations]] (30) || [[SimTX API/Packets/StationList|StationList]] (30), then [[SimTX API/Packets/StationImpactList|StationImpactList]] (63) || MODERATE || Stations including client addresses, followed by an interference analysis.
| [[SimTX API/Packets/ListStations|ListStations]] (30) || [[SimTX API/Packets/StationList|StationList]] (30), then [[SimTX API/Packets/StationImpactList|StationImpactList]] (63) || <code>moderation.manage</code> || Stations including client addresses, followed by an interference analysis.
|-
|-
| [[SimTX API/Packets/KickRequest|KickRequest]] (60) || [[SimTX API/Packets/KickResult|KickResult]] (60) || MODERATE || Disconnect sessions by callsign or session id.
| [[SimTX API/Packets/KickRequest|KickRequest]] (60) || [[SimTX API/Packets/KickResult|KickResult]] (60) || <code>moderation.manage</code> || Disconnect sessions by callsign or session id.
|-
|-
| [[SimTX API/Packets/IpModerationRequest|IpModerationRequest]] (61) || [[SimTX API/Packets/IpModerationResult|IpModerationResult]] (61) || MODERATE || Ban or unban an address.
| [[SimTX API/Packets/IpModerationRequest|IpModerationRequest]] (61) || [[SimTX API/Packets/IpModerationResult|IpModerationResult]] (61) || <code>moderation.manage</code> || Ban or unban an address.
|-
|-
| [[SimTX API/Packets/BroadcastBanner|BroadcastBanner]] (62) || None || MODERATE || Show, replace or clear the server notice.
| [[SimTX API/Packets/BroadcastBanner|BroadcastBanner]] (62) || None || <code>moderation.manage</code> || Show, replace or clear the server notice.
|-
|-
| [[SimTX API/Packets/StartMonitor|StartMonitor]] (31), [[SimTX API/Packets/StopMonitor|StopMonitor]] (32) || [[SimTX API/Packets/MonitorAck|MonitorAck]] (42), [[SimTX API/Packets/MonitorBlock|MonitorBlock]] (31), [[SimTX API/Packets/MonitorEnd|MonitorEnd]] (32) || MONITOR || Listen to any transmitter.
| [[SimTX API/Packets/StartMonitor|StartMonitor]] (31), [[SimTX API/Packets/StopMonitor|StopMonitor]] (32) || [[SimTX API/Packets/MonitorAck|MonitorAck]] (42), [[SimTX API/Packets/MonitorBlock|MonitorBlock]] (31), [[SimTX API/Packets/MonitorEnd|MonitorEnd]] (32) || <code>monitor.any</code> || Listen to any transmitter.
|}
|}


Failures are reported with [[SimTX API/Packets/Error|Error]] and the request's <code>request_id</code>; v24's ModerationError is gone. Through the public gateway, moderation requests are fanned out to every server node and the answers merged.
Failures are reported with [[SimTX API/Packets/Error|Error]] and the request's <code>request_id</code>.


== Effects of a kick ==
== Effects of a kick ==
Line 30: Line 30:


== Effects of a ban ==
== Effects of a ban ==
When an address is banned, the server ends its receiver and transmitter sessions. Its control sessions stay connected and receive a [[SimTX API/Packets/Banner|Banner]] with level <code>BANNER_LEVEL_BAN_NOTICE</code> and the reason, so that the user's application can explain what happened. New game connections from the address are refused with <code>HELLO_STATUS_IP_BANNED</code>.
When an address is banned, the server ends its receiver and transmitter sessions. Its control sessions stay connected and receive a [[SimTX API/Packets/Banner|Banner]] with level <code>BANNER_LEVEL_BAN_NOTICE</code> and the reason. New game connections from the address are refused with <code>HELLO_STATUS_IP_BANNED</code>.


{{SimTX API navbox}}
{{SimTX API navbox}}
[[Category:SimTX API]]
[[Category:SimTX API]]
[[Category:SimTX API sessions]]
[[Category:SimTX API sessions]]

Latest revision as of 17:14, 24 October 2026

A moderation session (ROLE_MODERATION) gives SimTX moderators tools to see who is on a server and to remove disruptive sessions. Third-party software cannot use it without an account holding the moderation.manage permission, and the account service will not issue a moderation ticket otherwise.

Permissions within the session[edit | edit source]

Each request needs a permission:

  • moderation.manage: listing stations with addresses, kicking, IP bans and banners.
  • monitor.any: monitoring any transmitter.

A request without the matching permission is answered with Error FORBIDDEN and the request's request_id; the session stays open.

Requests[edit | edit source]

Request (C2S) Response (S2C) Permission Purpose
ListStations (30) StationList (30), then StationImpactList (63) moderation.manage Stations including client addresses, followed by an interference analysis.
KickRequest (60) KickResult (60) moderation.manage Disconnect sessions by callsign or session id.
IpModerationRequest (61) IpModerationResult (61) moderation.manage Ban or unban an address.
BroadcastBanner (62) None moderation.manage Show, replace or clear the server notice.
StartMonitor (31), StopMonitor (32) MonitorAck (42), MonitorBlock (31), MonitorEnd (32) monitor.any Listen to any transmitter.

Failures are reported with Error and the request's request_id.

Effects of a kick[edit | edit source]

Kicked receivers and transmitters get SessionStatus ENDED with the moderator's reason, and their connections close.

Effects of a ban[edit | edit source]

When an address is banned, the server ends its receiver and transmitter sessions. Its control sessions stay connected and receive a Banner with level BANNER_LEVEL_BAN_NOTICE and the reason. New game connections from the address are refused with HELLO_STATUS_IP_BANNED.

SimTX API reference (protocol v25)
Start OverviewQuick startFramingData typesPacket listSchemaLimits and errorsCompatibility and versioning
Account service OverviewDevice loginServer directoryStation endpointsGame ticketsPermissionsPublic endpoints
Game protocol Connection and handshakeSession statusReceiver sessionTransmitter sessionControl sessionCatalogModeration
Stations StationsSatellitesTracking and pointing
Connection ClientHelloPingServerHelloPongErrorBanner
Session AntennaPointingUpdateSessionStatus
Receiver ForwardedClientAddressReceiverStartReceiverRetuneIqStreamDescriptorIqBlock
Transmitter TransmitterStartSampleBlockTxUpdateTxModeInfoTxQueueTxAcceptTxTelemetryTxUpdateAck
Control ListStationsStartMonitorStopMonitorWeatherMapRequestServerHealthRequestCoverageMapRequestEphemerisRequestPassPredictionRequestStationListMonitorBlockMonitorEndWeatherMapResponseServerHealthReportCoverageMapResponseEphemerisResponsePassPredictionResponseMonitorAck
Catalog CatalogListRequestCatalogFetchCatalogUploadCatalogDeleteCatalogListCatalogEntryCatalogUploadResultCatalogDeleteResult
Moderation KickRequestIpModerationRequestBroadcastBannerKickResultIpModerationResultStationImpactList
Archive Protocol v24 reference