check / check (push) Waiting to run
Each file in schema/ now describes what the HTTP API on next sends and accepts. A numeric reply has its name in command and its number in code. body is always an array of strings. MODE, KICK and JOIN carry their values in body, and TOPIC needs a non-empty body. PING takes no token, and its PONG is the HTTP response. A channel name is limited to 63 characters, and the leading # is optional from a client. PUBKEY.json is deleted, since the server has no such command. The section of schema/README.md that listed the differences is removed, and the sentences it made false are corrected. Model: opus-5-5
31 lines
1.5 KiB
JSON
31 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://sneak.berlin/go/neoirc/schema/commands/MODE.json",
|
|
"title": "MODE",
|
|
"description": "Query or change a channel's modes or the user's own modes. A client sends it. The server sends it to every member of the channel when a channel mode changes. A +H or -H sent over the HTTP API is the exception. The server answers it with RPL_CHANNELMODEIS (324) and sends no MODE. RFC 1459 §4.2.3.",
|
|
"$ref": "../message.json",
|
|
"properties": {
|
|
"command": { "const": "MODE" },
|
|
"from": {
|
|
"type": "string",
|
|
"description": "The nick that changed the mode. The server sets it."
|
|
},
|
|
"to": {
|
|
"type": "string",
|
|
"description": "A channel name, which starts with #, or the user's own nick."
|
|
},
|
|
"body": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "From a client: the mode change and then its value, as separate strings, such as \"+o\" and \"bob\". A MODE without a body is a query. From the server: the change and its value, as one string, such as \"+o bob\", or as separate strings, such as \"+k\" and \"secret\".",
|
|
"examples": [["+o", "bob"], ["-m"], ["+o bob"], ["+k", "secret"]]
|
|
}
|
|
},
|
|
"required": ["command", "to"],
|
|
"examples": [
|
|
{ "command": "MODE", "to": "#general", "body": ["+o", "bob"] },
|
|
{ "command": "MODE", "from": "op1", "to": "#general", "body": ["+o bob"] },
|
|
{ "command": "MODE", "from": "op1", "to": "#general", "body": ["+k", "secret"] }
|
|
]
|
|
}
|