diff --git a/docs/server/messages/burst.yml b/docs/server/messages/burst.yml index 6ab99dbfe..f1a1e1c4a 100644 --- a/docs/server/messages/burst.yml +++ b/docs/server/messages/burst.yml @@ -1,7 +1,6 @@ name: BURST phase: - wait-auth-2 -source: sid syntax: fields: ts: The time at which the remote server started bursting. Used for clock synchronization. diff --git a/docs/server/messages/capab.yml b/docs/server/messages/capab.yml index 7893e784d..fb85c37f6 100644 --- a/docs/server/messages/capab.yml +++ b/docs/server/messages/capab.yml @@ -30,7 +30,8 @@ extra: |- Protocol Version | Supported By ---------------- | ------------- 1202 | InspIRCd v2 — v3 - 1205 | InspIRCd v3 + 1205 | InspIRCd v3 & v4 (dev) + 1206 | InspIRd v4 (dev) If provided the capability-key fields can be set to one of the following values: diff --git a/docs/server/messages/endburst.yml b/docs/server/messages/endburst.yml index 7abdd9e06..93f57464f 100644 --- a/docs/server/messages/endburst.yml +++ b/docs/server/messages/endburst.yml @@ -1,5 +1,4 @@ name: ENDBURST -source: sid description: |- Marks the source server as no longer bursting. example: diff --git a/docs/server/messages/fjoin.yml b/docs/server/messages/fjoin.yml index 09efc44fc..66940381d 100644 --- a/docs/server/messages/fjoin.yml +++ b/docs/server/messages/fjoin.yml @@ -1,5 +1,4 @@ name: FJOIN -source: sid syntax: fields: channel: The channel which is being introduced to the network. diff --git a/docs/server/messages/index.md b/docs/server/messages/index.md index 609b585af..569345ff7 100644 --- a/docs/server/messages/index.md +++ b/docs/server/messages/index.md @@ -8,7 +8,7 @@ title: InspIRCd Spanning Tree Protocol — Messages Messages are formatted the same as [a standard IRCv3 message](https://ircv3.net/specs/extensions/message-tags.html#format) other than the following differences: -- The prefix will be [a SID or UUID](/server/concepts/#uuids) instead of a nick!user@host mask. +- The prefix will be [a SID or UUID](/server/concepts/#uuids) instead of a nick!user@host mask. If no prefix is present then the message is from the directly connected server. - Lines are terminated with a line feed (`\n`) instead of a carriage return and a line feed (`\r\n`). - Support for arbitrary message tags is assumed and does not require negotiating a client capability. - Tags that begin with a tilde (`~`) are internal to the server protocol and are not intended to be exposed to users. @@ -26,14 +26,19 @@ This page only lists server messages. For details on user commands that may be s {% for msg in server_messages -%} +{% if msg.source is defined %} +{% set prefix = ":<" ~ msg.source ~ ">" %} +{% else %} +{% set prefix = "[:]" %} +{% endif %} [{{ msg.name }}](/server/messages/{{ msg.name | lower }}/) {% if msg.syntax is not defined %} -`{% if msg.source %}:<{{ msg.source }}> {% endif %}{{ msg.name }}` +`{{ prefix }} {{ msg.name }}` {% elif msg.syntax.text is string %} -`{% if msg.source %}:<{{ msg.source }}> {% endif %}{{ msg.name }} {{ msg.syntax.text }}` +`{{ prefix }} {{ msg.name }} {{ msg.syntax.text }}` {% else %} -{% for syntax in msg.syntax.text %}`{% if syntax.startswith("^") %}{{ msg.name }} {{ syntax[1:] }}{% else %}{% if msg.source %}:<{{ msg.source }}> {% endif %}{{ msg.name }} {{ syntax }}{% endif %}`{% if not loop.last %}
{% endif %}{% endfor %} +{% for syntax in msg.syntax.text %}`{{ prefix }} {{ msg.name }} {{ syntax }}`{% if not loop.last %}
{% endif %}{% endfor %} {% endif %} {% endfor %} diff --git a/docs/server/messages/metadata.yml b/docs/server/messages/metadata.yml index 9f845013b..ad4196b21 100644 --- a/docs/server/messages/metadata.yml +++ b/docs/server/messages/metadata.yml @@ -1,5 +1,4 @@ name: METADATA -source: sid syntax: fields: channel: The channel which the metadata applies to. diff --git a/docs/server/messages/ping.yml b/docs/server/messages/ping.yml index 7ce07ec74..4dfe0d98c 100644 --- a/docs/server/messages/ping.yml +++ b/docs/server/messages/ping.yml @@ -1,5 +1,4 @@ name: PING -source: sid syntax: fields: target: The identifier of the target server. diff --git a/docs/server/messages/pong.yml b/docs/server/messages/pong.yml index 93d2f2e2e..4ecaf802f 100644 --- a/docs/server/messages/pong.yml +++ b/docs/server/messages/pong.yml @@ -1,5 +1,4 @@ name: PONG -source: sid syntax: fields: target: The identifier of the target server. diff --git a/docs/server/messages/resync.yml b/docs/server/messages/resync.yml index 4e2ab62eb..ccf6d027c 100644 --- a/docs/server/messages/resync.yml +++ b/docs/server/messages/resync.yml @@ -1,5 +1,4 @@ name: RESYNC -source: sid syntax: fields: channel: The channel to resynchronize. diff --git a/docs/server/messages/save.yml b/docs/server/messages/save.yml index c45eb2a43..201b9bd04 100644 --- a/docs/server/messages/save.yml +++ b/docs/server/messages/save.yml @@ -1,5 +1,4 @@ name: SAVE -source: sid syntax: fields: uid: The UUID of the user to resolve the nick collision of. diff --git a/docs/server/messages/server.yml b/docs/server/messages/server.yml index b74ed4d72..002635da4 100644 --- a/docs/server/messages/server.yml +++ b/docs/server/messages/server.yml @@ -4,7 +4,6 @@ phase: - wait-auth-1 - wait-auth-2 - connected -source: sid syntax: fields: server-name: The unique hostname of the new server. @@ -13,7 +12,7 @@ syntax: description: A description of the new server. data: One or more key=value pairs which represent the state of a remote server. text: - - ^ : + - : - []+ : description: |- Introduces a server to the network. diff --git a/docs/server/messages/sinfo.yml b/docs/server/messages/sinfo.yml index 4e126abef..61a354538 100644 --- a/docs/server/messages/sinfo.yml +++ b/docs/server/messages/sinfo.yml @@ -1,5 +1,4 @@ name: SINFO -source: sid syntax: fields: key: The key which is being set. diff --git a/docs/server/messages/snonotice.yml b/docs/server/messages/snonotice.yml index 8e34a183c..c89134739 100644 --- a/docs/server/messages/snonotice.yml +++ b/docs/server/messages/snonotice.yml @@ -1,5 +1,4 @@ name: SNONOTICE -source: sid syntax: fields: snochar: The [server notice character](/3/snomasks) that the message is associated with. diff --git a/docs/server/messages/svsjoin.yml b/docs/server/messages/svsjoin.yml index 7468f0330..6d4ddb16e 100644 --- a/docs/server/messages/svsjoin.yml +++ b/docs/server/messages/svsjoin.yml @@ -1,5 +1,4 @@ name: SVSJOIN -source: sid syntax: fields: uid: The UUID of the user to join to the specified channel. diff --git a/docs/server/messages/svsnick.yml b/docs/server/messages/svsnick.yml index b517336b9..a81720982 100644 --- a/docs/server/messages/svsnick.yml +++ b/docs/server/messages/svsnick.yml @@ -1,5 +1,4 @@ name: SVSNICK -source: sid syntax: fields: uid: The UUID of the user to change the nickname of. diff --git a/docs/server/messages/svspart.yml b/docs/server/messages/svspart.yml index c8279b6fe..a5a9d7f64 100644 --- a/docs/server/messages/svspart.yml +++ b/docs/server/messages/svspart.yml @@ -1,5 +1,4 @@ name: SVSPART -source: sid syntax: fields: uid: The UUID of the user to part from the specified channel. diff --git a/docs/server/messages/uid.yml b/docs/server/messages/uid.yml index fd98e956a..f787d1256 100644 --- a/docs/server/messages/uid.yml +++ b/docs/server/messages/uid.yml @@ -1,5 +1,4 @@ name: UID -source: sid syntax: fields: uid: The UUID of the user who is being introduced diff --git a/mkdocs_inspircd/templates/servermsg.md.j2 b/mkdocs_inspircd/templates/servermsg.md.j2 index 5a352899a..424d55411 100644 --- a/mkdocs_inspircd/templates/servermsg.md.j2 +++ b/mkdocs_inspircd/templates/servermsg.md.j2 @@ -26,22 +26,18 @@ Fully connected | {% if "connected" in phase %}✔️{% else %}❌{% end ### Syntax {% if source is defined %} -{% set prefix = " :<" ~ source ~ "> " %} +{% set prefix = ":<" ~ source ~ ">" %} {% else %} -{% set prefix = "" %} +{% set prefix = "[:]" %} {% endif %} {% if syntax is not defined %} -`{{ prefix }}{{ name }} +`{{ prefix }} {{ name }} {% elif syntax.text is string %} -`{{ prefix }}{{ name }} {{ syntax.text }}` +`{{ prefix }} {{ name }} {{ syntax.text }}` {% else %} {% for syntax_line in syntax.text %} -{% if syntax_line.startswith("^") %} -`{{ name }} {{ syntax_line[1:] }}` -{% else %} -`{{ prefix }}{{ name }} {{ syntax_line }}` -{% endif %} +`{{ prefix }} {{ name }} {{ syntax_line }}` {% endfor %} {% endif %}