{ "$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"] } ] }