From 6a39265abe2e743988504c8695c6e11b6841c4bf Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 30 Aug 2024 20:14:14 +0100 Subject: [PATCH] Update for the changes in v4.3.0. --- docs/3/configuration/_whowas.yml | 30 ++++++++++++- docs/3/modules/showfile.yml | 75 ++++++++++++++++++++++++++++++- docs/4/_motd.md | 38 ++++++++++++++++ docs/4/change-log.md | 66 +++++++++++++++++++++++++++ docs/4/configuration/_connect.yml | 13 +++++- docs/4/configuration/_whowas.yml | 16 +++++-- docs/4/modules/argon2.yml | 28 ------------ docs/4/modules/opermotd.yml | 6 ++- docs/4/modules/showfile.yml | 4 ++ 9 files changed, 240 insertions(+), 36 deletions(-) mode change 120000 => 100644 docs/3/configuration/_whowas.yml mode change 120000 => 100644 docs/3/modules/showfile.yml create mode 100644 docs/4/_motd.md diff --git a/docs/3/configuration/_whowas.yml b/docs/3/configuration/_whowas.yml deleted file mode 120000 index ba5734ba4..000000000 --- a/docs/3/configuration/_whowas.yml +++ /dev/null @@ -1 +0,0 @@ -../../4/configuration/_whowas.yml \ No newline at end of file diff --git a/docs/3/configuration/_whowas.yml b/docs/3/configuration/_whowas.yml new file mode 100644 index 000000000..ba498b68d --- /dev/null +++ b/docs/3/configuration/_whowas.yml @@ -0,0 +1,29 @@ +name: whowas +description: |- + The `` tag defines the configuration of the `/WHOWAS` database. This tag can only be defined once. +attributes: +- name: groupsize + type: Number + required: false + default: '10' + description: |- + The maximum number of `/WHOWAS` entries for a nickname. If set to 0 then `/WHOWAS` is disabled. +- name: maxgroups + type: Number + required: false + default: '10240' + description: |- + The maximum number of `/WHOWAS` nickname groups. If set to 0 then `/WHOWAS` is disabled. +- name: maxkeep + type: Duration + required: false + default: 1h + description: |- + The period of time to keep `/WHOWAS` records for. +details: "" +example: |- + ```xml + + ``` diff --git a/docs/3/modules/showfile.yml b/docs/3/modules/showfile.yml deleted file mode 120000 index 56c156c06..000000000 --- a/docs/3/modules/showfile.yml +++ /dev/null @@ -1 +0,0 @@ -../../4/modules/showfile.yml \ No newline at end of file diff --git a/docs/3/modules/showfile.yml b/docs/3/modules/showfile.yml new file mode 100644 index 000000000..f5c8c87d2 --- /dev/null +++ b/docs/3/modules/showfile.yml @@ -0,0 +1,74 @@ +name: showfile + +description: |- + This module adds support for showing the contents of files to users when they execute a command. + +configuration: +- name: showfile + description: |- + The `` tag defines a command to show the contents of a file. This tag can be defined as many times as required. + attributes: + - name: name + type: Text + required: true + default: null + description: |- + The name of the command that users should execute to receive this file. + - name: file + type: Text + required: true + default: null + description: |- + The file path or name of the field in `<files>` / `<execfiles>` to use when reading the file. + - name: method + type: Text + required: false + default: numeric + description: |- + The method to use to send the message to the user. + - name: endnumeric + type: Number + required: false + default: 309 + description: |- + If the method field is set to numeric then the numeric to use to stop the response. + - name: endtext + type: Text + required: false + default: End of COMMAND + description: |- + If the method field is set to numeric then the message to use in the stopping numeric. + - name: intronumeric + type: Number + required: false + default: 308 + description: |- + If the method field is set to numeric then the numeric to use to start the response. + - name: introtext + type: Text + required: false + default: Showing COMMAND + description: |- + If the method field is set to numeric then the message to use in the starting numeric. + - name: textnumeric + type: Number + required: false + default: 232 + description: |- + If the method field is set to numeric then the numeric to use to show the response. + details: |- + The method field should be set to one of the following values: + + Value | Description + ------- | ----------- + numeric | Send the message using the specified numerics. + msg | Send the message using `PRIVMSG`. + notice | Send the message using `NOTICE`. + + example: |- + ```xml + + ``` diff --git a/docs/4/_motd.md b/docs/4/_motd.md new file mode 100644 index 000000000..03614e0b2 --- /dev/null +++ b/docs/4/_motd.md @@ -0,0 +1,38 @@ + + +Escape | Example (raw) | Example (formatted) | Description +----------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------- +`\b` | `foo \bbar\b baz` | foo bar baz | Toggles whether text should be bold. +`\c[,]` | `foo \c03bar\c baz`
`foo \c11,04bar\c baz` | foo bar baz
foo bar baz | Toggles the foreground and/or background color of text. +`\c{[,]}` | `foo \c{green}bar\c baz`
`foo \c{cyan,red}bar\c baz` | foo bar baz
foo bar baz | **New in v4.3.0!** Toggles the foreground and/or background color of text using color names (see below). +`\h[,]` | `foo \hea74dcbar\h baz`
`foo \h613583,2ec27ebar\h baz` | foo bar baz
foo bar baz | Toggles the foreground and/or background color of text using hex colors (not widely supported). +`\i` | `foo \ibar\i baz` | foo bar baz | Toggles whether text should be italicised. +`\m` | `foo \mbar\m baz` | foo bar baz | Toggles whether text should be monospace (not widely supported). +`\r` | `foo \c{blue,orange}bar\r baz` | foo bar baz | Swaps the foreground and background color. +`\s` | `foo \sbar\s baz` | foo bar baz | Toggles whether text should be struckthrough (not widely supported). +`\u` | `foo \ubar\u baz` | foo bar baz | Toggles whether text should be underlined. +`\x` | `foo \b\ibar\x baz` | foo bar baz | Terminates any previously specified formatting. + +If using named colors they are converted to raw color codes as follows: + +Code | Name | Example +---- | ----------- | ------- +00 | white |
 
+01 | black |
 
+02 | blue |
 
+03 | green |
 
+04 | red |
 
+05 | brown |
 
+06 | magenta |
 
+07 | orange |
 
+08 | yellow |
 
+09 | light green |
 
+10 | cyan |
 
+11 | light cyan |
 
+12 | light blue |
 
+13 | pink |
 
+14 | grey |
 
+15 | light grey |
 
+99 | default | *Depends on client theme* + +Colors in the range 16-98 are not widely supported and do not have names. See [ircdocs](https://modern.ircdocs.horse/formatting) for more information. diff --git a/docs/4/change-log.md b/docs/4/change-log.md index 56d39066a..4a405a995 100644 --- a/docs/4/change-log.md +++ b/docs/4/change-log.md @@ -6,6 +6,72 @@ title: v4 Change Log This page lists changes which have happened between releases. +## InspIRCd 4.3.0 + + + +**This version of InspIRCd has not yet been released.** + +- Added `` to allow updating the whowas database on nick change as well as quit. + +- Added support for building against yyjson to the log_json module. + +- Added support for human readable colour names in MOTD files using `\c[fg-color,bg-color]` + +- Added the `&dir.example;` config variable to make it easier to include example configs on system-wide installs. + +- Changed command processing to check whether a command is usable before registration before the parameter count is checked . + +- Changed the example `` tags to be actually useful. + +- Developer: added `InspIRCd::ProcessColors(std::string)` and deprecated the vector overload. + +- Developer: added formatting overloads for `{Membership,User}::WriteNotice`. + +- Developer: added the `Numeric::push_fmt` method to push a formatted parameter onto a numeric. + +- Developer: deprecated the non-printable overload of `InspIRCd::GenRandomStr` in favour of `GenRandom`. + +- Developer: refactored the `InspIRCd` and `ServerStats` types. + +- Fixed `/AUTHENTICATE` being silently dropped when the user does not have the `sasl` capability or when a malformed `` parameter is sent. + +- Fixed `/WHOWAS` not showing the real server name to operators with the `services/auspex` privilege. + +- Fixed `InspIRCd::StripColor` not stripping the value of hex colours. + +- Fixed `InspIRCd::StripColor` stripping some legitimate non-formatting characters. + +- Fixed bursting metadata between servers. + +- Fixed downgrading `LMODE` messages when broadcasting to remote servers. + +- Fixed downgrading `SINFO` messages when broadcasting to remote servers. + +- Fixed exceptions from loggers not being handled. + +- Fixed measuring the CPU load on Windows. + +- Fixed retrieving database rows in the MySQL module. + +- Fixed the argon2 module erroneously treating lanes as separate to threads. + +- Fixed the blockcolor module blocking some legitimate non-formatting characters. + +- Fixed the build when compiling with C++20 or newer. + +- Made it clear that the cloak_md5 and md5 modules are deprecated. + +- Reduced the memory usage of the whowas database. + +- Refactored the Perl init script somewhat. + +- Replaced the InspIRCd-specific `RPL_WHOWASIP` numeric with `RPL_WHOISACTUALLY`. + +- Tweaked the defaults for `` to make more sense for most networks. + +- Tweaked the message for `RPL_WHOISCERTFP` to make it clear if the fingerprint is hashed using a compatibility algorithm. + ### InspIRCd 4.2.0 **This version of InspIRCd was released on 2024-08-03.** diff --git a/docs/4/configuration/_connect.yml b/docs/4/configuration/_connect.yml index fbedbf54e..481e33bd0 100644 --- a/docs/4/configuration/_connect.yml +++ b/docs/4/configuration/_connect.yml @@ -146,12 +146,22 @@ attributes: default: 'No' description: |- Whether users in this class are connecting from a shared host and can be uniquely identified by their username. +- name: motd + type: Text + required: false + default: 'motd' + description: |- + The file path or name of the field in <files> / <execfiles> to use when reading the message of the day. details: |+ !!! warning "" The `hash` field is currently optional but will be required in the next major version of InspIRCd when using password authentication. {! 4/modules/_hash_table.md !} + The file specified in the motd field can contain the following formatting codes: + + {! 4/_motd.md !} + example: |- Denies connections to clients connecting from 3ffe::0/32: @@ -185,7 +195,8 @@ example: |- softsendq="8192" threshold="10" timeout="10" - uniqueusername="no"> + uniqueusername="no" + motd="motd"> ``` #### Special Notes diff --git a/docs/4/configuration/_whowas.yml b/docs/4/configuration/_whowas.yml index ba498b68d..9e3a69606 100644 --- a/docs/4/configuration/_whowas.yml +++ b/docs/4/configuration/_whowas.yml @@ -11,19 +11,27 @@ attributes: - name: maxgroups type: Number required: false - default: '10240' + default: '10000 *(since v4.3.0)*
10240 *(before v4.3.0)*' description: |- The maximum number of `/WHOWAS` nickname groups. If set to 0 then `/WHOWAS` is disabled. - name: maxkeep type: Duration required: false - default: 1h + default: '7d *(since v4.3.0)*
1h *(before v4.3.0)*' description: |- The period of time to keep `/WHOWAS` records for. +- name: nickupdate + type: Boolean + required: false + default: 'Yes' + added: 4.3.0 + description: |- + Whether to update the `/WHOWAS` database on nick change as well as quit. details: "" example: |- ```xml + maxgroups="10000" + maxkeep="7d" + nickupdate="yes"> ``` diff --git a/docs/4/modules/argon2.yml b/docs/4/modules/argon2.yml index ed3ccb361..0437aa7dc 100644 --- a/docs/4/modules/argon2.yml +++ b/docs/4/modules/argon2.yml @@ -23,12 +23,6 @@ configuration: default: 3 description: |- The time hardness of the Argon2 algorithms. - - name: lanes - type: Number - required: false - default: 1 - description: |- - The number of parallel chains to run at once. - name: threads type: Number required: false @@ -52,7 +46,6 @@ configuration: ```xml @@ -73,12 +66,6 @@ configuration: default: '*See <argon2:iterations>*' description: |- The time hardness of the Argon2d algorithm. - - name: lanes - type: Number - required: false - default: '*See <argon2:lanes>*' - description: |- - The number of parallel chains to run at once. - name: threads type: Number required: false @@ -102,7 +89,6 @@ configuration: ```xml @@ -123,12 +109,6 @@ configuration: default: '*See <argon2:iterations>*' description: |- The time hardness of the Argon2i algorithm. - - name: lanes - type: Number - required: false - default: '*See <argon2:lanes>*' - description: |- - The number of parallel chains to run at once. - name: threads type: Number required: false @@ -152,7 +132,6 @@ configuration: ```xml @@ -173,12 +152,6 @@ configuration: default: '*See <argon2:iterations>*' description: |- The time hardness of the Argon2id algorithm. - - name: lanes - type: Number - required: false - default: '*See <argon2:lanes>*' - description: |- - The number of parallel chains to run at once. - name: threads type: Number required: false @@ -202,7 +175,6 @@ configuration: ```xml diff --git a/docs/4/modules/opermotd.yml b/docs/4/modules/opermotd.yml index a24888a0c..1a46993e0 100644 --- a/docs/4/modules/opermotd.yml +++ b/docs/4/modules/opermotd.yml @@ -47,7 +47,11 @@ configuration: default: 'Yes' description: |- Whether to send the server operator message of the day to server operators when they log into their server operator account. - details: "" + details: |- + The file specified in the motd field can contain the following formatting codes: + + {! 4/_motd.md !} + example: |- Shows an oper MOTD to Sadie when they log into their server operator account: diff --git a/docs/4/modules/showfile.yml b/docs/4/modules/showfile.yml index f5c8c87d2..9127ba9d4 100644 --- a/docs/4/modules/showfile.yml +++ b/docs/4/modules/showfile.yml @@ -57,6 +57,10 @@ configuration: description: |- If the method field is set to numeric then the numeric to use to show the response. details: |- + The file specified in the file field can contain the following formatting codes: + + {! 4/_motd.md !} + The method field should be set to one of the following values: Value | Description