SimTX API/Moderation session
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.