SimTX API/Packets/IpModerationRequest: Difference between revisions
Appearance
Protocol v25 reference: IpModerationRequest Tag: Removed redirect |
Remove development history and server internals |
||
| Line 45: | Line 45: | ||
== Example == | == Example == | ||
Complete frames, including the varint length prefix | Complete frames, including the varint length prefix. | ||
'''<code>ip_moderation_ban</code>''' (client to server, 30 bytes): | '''<code>ip_moderation_ban</code>''' (client to server, 30 bytes): | ||
Latest revision as of 17:16, 24 October 2026
| Frame | ClientFrame, field 61
|
|---|---|
| Member | ip_moderation
|
| Direction | Client → server |
| Session | Moderation |
| Roles | ROLE_MODERATION.
|
| Permission | moderation.manage
|
| Answered by | IpModerationResult or Error |
| Defined in | control.proto
|
IpModerationRequest bans or unbans a client address.
Definition[edit | edit source]
message IpModerationRequest {
int64 request_id = 1;
IpModerationAction action = 2;
string target = 3;
string reason = 4;
int64 duration_seconds = 5;
}
Fields[edit | edit source]
| # | Field | Type | Description |
|---|---|---|---|
| 1 | request_id |
int64 |
Nonzero; echoed in the IpModerationResult or Error. |
| 2 | action |
IpModerationAction | IP_MODERATION_ACTION_BAN or IP_MODERATION_ACTION_UNBAN. Required.
|
| 3 | target |
string |
An IP address, or the callsign of a connected session whose address should be used. |
| 4 | reason |
string |
Reason, shown to the banned user. |
| 5 | duration_seconds |
int64 |
Ban duration. 0 = permanent. At most 3,650 days; not negative. |
Effects[edit | edit source]
A ban disconnects the address's receiver and transmitter sessions, sends a BANNER_LEVEL_BAN_NOTICE Banner to its control sessions, and refuses new game connections from it with HELLO_STATUS_IP_BANNED. Unbanning an address that is not banned is answered with Error NOT_FOUND; an invalid target or duration with INVALID_REQUEST.
Example[edit | edit source]
Complete frames, including the varint length prefix.
ip_moderation_ban (client to server, 30 bytes):
1D frame length 29
EA 03 1A ip_moderation (IpModerationRequest), 26 bytes
08 2E request_id = 46
10 02 action = 2 (IP_MODERATION_ACTION_BAN)
1A 0B 32 30 33 2E 30 2E 31 31 33 2E 39 target = "203.0.113.9"
22 04 73 70 61 6D reason = "spam"
28 90 1C duration_seconds = 3600