UnrealIRCd 6.1.0 ================= This is UnrealIRCd 6.1.0 stable. It is the direct successor to 6.0.7, there will be no 6.0.8. This release contains several channel mode `+f` enhancements and introduces a new channel mode `+F` which works with flood profiles like `+F normal` and `+F strict`. It is much easier for users than the scary looking mode +f. UnrealIRCd 6.1.0 also contains lots of JSON-RPC improvements, which is used by the [UnrealIRCd admin panel](https://www.unrealircd.org/docs/UnrealIRCd_webpanel). Live streaming of logs has been added and the webpanel now communicates to UnrealIRCd which web user issued a command (eg: who issued a kill, who changed a channel mode, ..). Other improvements are whowasdb (persistent WHOWAS history) and a new guide on running a Tor Onion service. The release also fixes a crash bug related to remote includes and fixes multiple memory leaks. See the full release notes below. As usual on *NIX you can upgrade easily with the command: `./unrealircd upgrade` ### Enhancements: * Channel flood protection improvements: * New [channel mode `+F`](https://www.unrealircd.org/docs/Channel_anti-flood_settings) (uppercase F). This allows the user to choose a "flood profile", which (behind the scenes) translates to something similar to an `+f` mode. This so end-users can simply choose an `+F` profile without having to learn the complex channel mode `+f`. * For example `+F normal` effectively results in `[7c#C15,30j#R10,10k#K15,40m#M10,8n#N15]:15` * Multiple profiles are available and changing them is possible, see [the documentation](https://www.unrealircd.org/docs/Channel_anti-flood_settings). * Any settings in mode `+f` will override the ones of the `+F` profile. To see the effective flood settings, use `MODE #channel F`. * You can optionally set a default profile via [set::anti-flood::channel::default-profile](https://www.unrealircd.org/docs/Channel_anti-flood_settings#Default_profile). This profile is used if the channel is `-F`. If the user does not want channel flood protection then they have to use an explicit `+F off`. * When channel mode `+f` or `+F` detect that a flood is caused by >75% of ["unknown-users"](https://www.unrealircd.org/docs/Security-group_block), the server will now set a temporary ban on `~security-group:unknown-users`. It will still set `+i` and other modes if the flood keeps on going (eg. is caused by known-users). * Forced nick changes (eg. by NickServ) are no longer counted in nick flood for channel mode `+f`/`+F`. * When a server splits on the network, we now temporarily disable +f/+F join-flood protection for 75 seconds ([set::anti-flood::channel::split-delay](https://www.unrealircd.org/docs/Channel_anti-flood_settings#config)). This because a server splitting could mean that server has network problems or has died (or restarted), in which case the clients would typically reconnect to the remaining other servers, triggering an +f/+F join-flood and channels ending up being `+i` and such. That is not good because we want +f/+F to be as effortless as possible, with as little false positives as possible. * If your network has 5+ servers and the user load is spread evenly among them, then you could disable this feature by setting the amount of seconds to `0`. This because in such a scenario only 1/5th (20%) of the users would reconnect and hopefully don't trigger +f/+F join floods. * All these features only work properly if all servers are on 6.1.0-rc1 or later. * New module `whowasdb` (persistent `WHOWAS` history): this saves the WHOWAS history on disk periodically and when we terminate, so next server boot still has the WHOWAS history. This module is currently not loaded by default. * New option [listen::spoof-ip](https://www.unrealircd.org/docs/Listen_block#spoof-ip), only valid when using UNIX domain sockets (so listen::file). This way you can override the IP address that users come online with when they use the socket (default was and still is `127.0.0.1`). * Add a new guide [Running Tor Onion service with UnrealIRCd](https://www.unrealircd.org/docs/Running_Tor_Onion_service_with_UnrealIRCd) which uses the new listen::spoof-ip and optionally requires a services account. * [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC): * Logging of JSON-RPC requests (eg. via snomask `+R`) has been improved, it now shows: * The issuer, such as the user logged in to the admin panel (if known) * The parameters of the request * The JSON-RPC calls [`channel.list`](https://www.unrealircd.org/docs/JSON-RPC:Channel#channel.list), [`channel.get`](https://www.unrealircd.org/docs/JSON-RPC:Channel#channel.get), [`user.list`](https://www.unrealircd.org/docs/JSON-RPC:User#user.list) and [`user.get`](https://www.unrealircd.org/docs/JSON-RPC:User#user.get) now support an optional argument `object_detail_level` which specifies how detailed the [Channel](https://www.unrealircd.org/docs/JSON-RPC:Channel#Structure_of_a_channel) and [User](https://www.unrealircd.org/docs/JSON-RPC:User#Structure_of_a_client_object) response object will be. Especially useful if you don't need all the details in the list calls. * New JSON-RPC methods [`log.subscribe`](https://www.unrealircd.org/docs/JSON-RPC:Log#log.subscribe) and [`log.unsubscribe`](https://www.unrealircd.org/docs/JSON-RPC:Log#log.unsubscribe) to allow real-time streaming of [JSON log events](https://www.unrealircd.org/docs/JSON_logging). * New JSON-RPC method [`rpc.set_issuer`](https://www.unrealircd.org/docs/JSON-RPC:Rpc#rpc.set_issuer) to indiciate who is actually issuing the requests. The admin panel uses this to communicate who is logged in to the panel so this info can be used in logging. * New JSON-RPC methods [`rpc.add_timer`](https://www.unrealircd.org/docs/JSON-RPC:Rpc#rpc.add_timer) and [`rpc.del_timer`](https://www.unrealircd.org/docs/JSON-RPC:Rpc#rpc.del_timer) so you can schedule JSON-RPC calls, like stats.get, to be executed every xyz msec. * New JSON-RPC method [`whowas.get`](https://www.unrealircd.org/docs/JSON-RPC:Whowas#whowas.get) to fetch WHOWAS history. * Low ASCII is no longer filtered out in strings in JSON-RPC, only in JSON logging. * A new message tag `unrealircd.org/issued-by` which is IRCOp-only (and used intra-server) to communicate who actually issued a command. See [docs](https://www.unrealircd.org/issued-by). ### Changes: * The RPC modules are enabled by default now. This so remote RPC works from other IRC servers for calls like `modules.list`. The default configuration does NOT enable the webserver nor does it cause listening on any socket for RPC, for that you need to follow the [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) instructions. * The [blacklist-module](https://www.unrealircd.org/docs/Blacklist-module_directive) directive now accepts wildcards, eg `blacklist-module rpc/*;` * The setting set::modef-boot-delay has been moved to [set::anti-flood::channel::boot-delay](https://www.unrealircd.org/docs/Channel_anti-flood_settings#config). * We now only exempt `127.0.0.1` and `::1` from banning by default (hardcoded in the source). Previously we exempted whole `127.*` but that gets in the way if you want to allow Tor with a [require authentication](https://www.unrealircd.org/docs/Require_authentication_block) block or soft-ban. Now you can just tell Tor to bind to `127.0.0.2` so its not affected by the default exemption. ### Fixes: * Crash if there is a parse error in an included file and there are other remote included files still being downloaded. * Memory leak in WHOWAS * Memory leak when connecting to a TLS server fails * Workaround a bug in some websocket implementations where the WSOP_PONG frame is unmasked (now permitted). ### Developers and protocol: * The `cmode.free_param` definition changed. It now has an extra argument `int soft` and for return value you will normally `return 0` here. You can `return 1` if you resist freeing, which is rare and only used by `+F` with set::anti-flood::channel::default-profile. * New `cmode.flood_type_action` which can be used to indicate a channel mode can be used from +f/+F as an action. You need to specify for which flood type your mode is, eg `cmode.flood_type_action = 'j';` for joinflood. * JSON-RPC supports [UNIX domain sockets](https://www.unrealircd.org/docs/JSON-RPC:Technical_documentation#UNIX_domain_socket) for making RPC calls. If this is used, we now split on `\n` (newline) so multiple parallel requests can be handled properly. * Message tag `unrealircd.org/issued-by`, sent to IRCOps only. See [docs](https://www.unrealircd.org/issued-by). UnrealIRCd 6.0.7 ----------------- UnrealIRCd 6.0.7 makes WHOWAS show more information to IRCOps and adds an experimental spamfilter feature. It also contains other enhancements and quite a number of bug fixes. One notable change is that on linking of anope or atheme, every server will now check if they have ulines { } for that services server, since it's a common mistake to forget this, leading to desyncs or other weird problems. ### Enhancements: * [Spamfilter](https://www.unrealircd.org/docs/Spamfilter) can now be made UTF8-aware: * This is experimental, to enable: `set { spamfilter { utf8 yes; } }` * Case insensitive matches will then work better. For example, for extended Latin, a spamfilter on `ę` then also matches `Ę`. * Other PCRE2 features such as [\p](https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC5) can then be used. For example the regex `\p{Arabic}` would block all Arabic script. See also this [full list of scripts](https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC7). Please use this new tool with care. Blocking an entire language or script is quite a drastic measure. * As a consequence of this we require PCRE2 10.36 or newer. If your system PCRE2 is older, then the UnrealIRCd-shipped-library version will be compiled and `./Config` may take a little longer than usual. * `WHOWAS` now shows IP address and account information to IRCOps * Allow services to send a couple of protocol messages in the unregistered / SASL stage. These are: `CHGHOST`, `CHGIDENT` and `SREPLY` * This allows services to set the vhost on a user during SASL, so the user receives the vhost straight from the start, before all the auto-joining/re-rejoining of channels. * Future anope/atheme/etc services will presumably support this. * [WebSocket](https://www.unrealircd.org/docs/WebSocket_support) status is now synced over the network and an extra default [security group](https://www.unrealircd.org/docs/Security-group_block) `websocket-users` has been added. Similarly there is now security-group::websocket and security-group::exclude-websocket item. Same for [mask items](https://www.unrealircd.org/docs/Mask_item) such as in [set::restrict-commands::command::except](https://www.unrealircd.org/docs/Restrict_commands). * Support for IRCv3 [Standard Replies](https://ircv3.net/specs/extensions/standard-replies). Right now nothing fancy yet, other than us sending `ACCOUNT_REQUIRED_TO_CONNECT` from the authprompt module when a user is [soft-banned](https://www.unrealircd.org/docs/Soft_ban). * Add support for sending IRCv3 Standard Replies intra-server, eg from services (`SREPLY` server-to-server command) * Support `NO_COLOR` environment variable, as per [no-color.org](https://no-color.org). ### Changes: * We now verify that all servers have [ulines { }](https://www.unrealircd.org/docs/Ulines_block) for Anope and Atheme servers and reject the link if this is not the case. * The `FLOOD_BLOCKED` log message now shows the target of the flood for `target-flood-user` and `target-flood-channel`. * When an IRCOp sets `+H` to hide ircop status, only the swhois items that were added through oper will be hidden (and not the ones added by eg. vhost). Previously all were hidden. * Update shipped libraries: c-ares to 1.19.0, Jansson to 2.14, PCRE2 to 10.42, and on Windows LibreSSL to 3.6.2 and cURL to 8.0.1. ### Fixes: * Crash if a third party module is loaded which allows very large message tags (e.g. has no length check) * Crash if an IRCOp uses [`unrealircd.org/json-log`](https://www.unrealircd.org/docs/JSON_logging#Enabling_on_IRC) on IRC and during `REHASH` some module sends log output during MOD_INIT (eg. with some 3rd party modules) * Crash when parsing [deny link block](https://www.unrealircd.org/docs/Deny_link_block) * The [Module manager](https://www.unrealircd.org/docs/Module_manager) now works on FreeBSD and similar. * In `LUSERS` the "unknown connection(s)" count was wrong. This was just a harmless counting error with no other effects. * Silence warnings on Clang 15+ (eg. Ubuntu 23.04) * Don't download `GeoIP.dat` if you have [`blacklist-module geoip_classic;`](https://www.unrealircd.org/docs/Blacklist-module_directive) * Channel mode `+S` stripping too much on incorrect color codes. * Make [`@if module-loaded()`](https://www.unrealircd.org/docs/Defines_and_conditional_config) work correctly for modules that are about to be unloaded during REHASH. * Some missing notices if remotely REHASHing a server, and one duplicate line. * Check invalid host setting in oper::vhost, just like we already have in vhost::vhost. UnrealIRCd 6.0.6 ----------------- The main objective of this release is to enhance the new JSON-RPC functionality. In 6.0.5 we made a start and in 6.0.6 it is expanded a lot, plus some important bugs were fixed in it. Thanks everyone who has been testing the functionality! The new [UnrealIRCd Administration Webpanel](https://github.com/unrealircd/unrealircd-webpanel/) (which uses JSON-RPC) is very much usable now. It allows admins to view the users/channels/servers lists, view detailed information on users and channels, manage server bans and spamfilters, all from the browser. Both the JSON-RPC API and the webpanel are work in progress. They will improve and expand with more features over time. If you are already using UnrealIRCd 6.0.5 and you are NOT interested in JSON-RPC or the webpanel then there is NO reason to upgrade to 6.0.6. As usual, on *NIX you can easily upgrade with `./unrealircd upgrade` ### Enhancements: * The [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) API for UnrealIRCd has been expanded a lot. From 12 API methods to 42: `stats.get`, `rpc.info`, `user.part`, `user.join`, `user.quit`, `user.kill`, `user.set_oper`, `user.set_snomask`, `user.set_mode`, `user.set_vhost`, `user.set_realname`, `user.set_username`, `user.set_nick`, `user.get`, `user.list`, `server.module_list`, `server.disconnect`, `server.connect`, `server.rehash`, `server.get`, `server.list`, `channel.kick`, `channel.set_topic`, `channel.set_mode`, `channel.get`, `channel.list`, `server_ban.add`, `server_ban.del`, `server_ban.get`, `server_ban.list`, `server_ban_exception.add`, `server_ban_exception.del`, `server_ban_exception.get`, `server_ban_exception.list`, `name_ban.add`, `name_ban.del`, `name_ban.get`, `name_ban.list`, `spamfilter.add`, `spamfilter.del`, `spamfilter.get`, `spamfilter.list`. * Server admins can read the [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) documentation on how to get started. For developers, see the [Technical documentation](https://www.unrealircd.org/docs/JSON-RPC:Technical_documentation) for all info on the different RPC calls and the protocol. * Some functionality requires all servers to be on 6.0.6 or later. * Some functionality requires all servers to include `rpc.modules.default.conf` instead of only the single server that the webpanel interfaces with through JSON-RPC. When all servers have that file included then the API call `server.module_list` can work for remote servers, and the API call `server.rehash` for remote servers can return the actual rehash result and a full log of the rehash process. It is not used for any other API call at the moment, but in the future more API calls may need this functionality because it allows us to do things that are otherwise impossible or very hard. * Known issue: logging of RPC actions needs to be improved. For some API calls, like adding of server bans and spamfilters, this already works, but in other API calls it is not clearly logged yet "who did what". ### Changes: * Previously some server protocol commands could only be used by services, commands such as `SVSJOIN` and `SVSPART`. We now allow SVS* command to be used by any servers, so the JSON-RPC API can use them. There's a new option [set::limit-svscmds](https://www.unrealircd.org/docs/Set_block#set::limit-svscmds) so one can revert back to the original situation, if needed. * All JSON-RPC calls that don't change anything, such as `user.list` are now logged in the `rpc.debug` facility. Any call that changes anything like `user.join` or `spamfilter.add` is logged via `rpc.info`. This because JSON-RPC calls can be quite noisy and logging the read-only calls is generally not so interesting. ### Fixes: * When using JSON-RPC with UnrealIRCd 6.0.5 it would often crash * Fix parsing services version (anope) in `EAUTH`. ### Developers and protocol: * A new `RRPC` server to server command to handle RPC-over-IRC. This way the JSON-RPC user, like the admin panel, can interface with a remote server. If you are writing an RPC handler, then the remote RPC request does not look much different than a local one, so you can just process it as usual. See the code for `server.rehash` or `server.module_list` for an example (src/modules/rpc/server.c). UnrealIRCd 6.0.5 ----------------- This release adds experimental JSON-RPC support, a new TLINE command, the `./unrealircd restart` command has been improved to check for config errors, logging to files has been improved and there are several other enhancements. There are also two important changes: 1) servers that use websockets now also need to load the "webserver" module (so you may need to edit your config file). 2) we now require TLSv1.2 or higher and a modern cipher for IRC clients. This should be no problem for clients using any reasonably new SSL/TLS library (from 2014 or later). I would also like to take this opportunity to say that we are [looking for webdevs to create an UnrealIRCd admin panel](https://forums.unrealircd.org/viewtopic.php?t=9257). The previous attempt at this failed so we are looking for new people. See the full release notes below for all changes in more detail. As usual, on *NIX you can easily upgrade with `./unrealircd upgrade` ### Enhancements: * Internally the websocket module has been split up into 3 modules: `websocket_common`, `webserver` and `websocket`. The `websocket_common` one is loaded by default via modules.default.conf, the other two are not. **Important:** if you use websockets then you need to load two modules now (instead of only one): ``` loadmodule "websocket"; loadmodule "webserver"; ``` * [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) API for UnrealIRCd. This is work in progress. * New `TLINE` command to test *LINEs. This can be especially useful for checking how many people match an [extended server ban](https://www.unrealircd.org/docs/Extended_server_bans) such as `TLINE ~C:NL` * The `./unrealircd start` command will now refuse to start if UnrealIRCd is already running. * The `./unrealircd restart` command will validate the configuration file (it will call `./unrealircd configtest`). If there is a configuration error then the restart will not go through and the current UnrealIRCd process is kept running. * When an IRCOp is outside the channel and does `MODE #channel` they will now get to see the mode parameters too. This depends on the `channel:see:mode:remote` [operclass permission](https://www.unrealircd.org/docs/Operclass_permissions) which all IRCOps have by default if you use the default operclasses. * [Logging to a file](https://www.unrealircd.org/docs/Log_block) now creates a directory structure if needed. * You could already use: ``` log { source { !debug; all; } destination { file "ircd.%Y-%m-%d.log"; } } ``` * But now you can also use: ``` log { source { !debug; all; } destination { file "%Y-%m-%d/ircd.log"; } } ``` This is especially useful if you output to multiple log files and then want them grouped by date in a directory. * Add additional variables in [blacklist::reason](https://www.unrealircd.org/docs/Blacklist_block): * `$blacklist`: name of the blacklist block * `$dnsname`: the blacklist::dns::name * `$dnsreply`: the DNS reply code * Resolved technical issue so opers can `REHASH` from [Websocket connections](https://www.unrealircd.org/docs/WebSocket_support). * In the [TLD block](https://www.unrealircd.org/docs/Tld_block) the use of `tld::motd` and `tld::rules` is now optional. * Log which oper actually initiated a server link request (`CONNECT`) ### Changes: * SSL/TLS: By default we now require TLSv1.2 or later and a modern cipher with forward secrecy. Otherwise the connection is refused. * Since UnrealIRCd 4.2.2 (March 2019) users see an on-connect notice with a warning when they use an outdated TLS protocol or cipher that does not meet these requirements. * This move also reflects the phase out of versions below TLSv1.2 which happened in browsers in 2020/2021. * In practice on the client-side this requires at least: * OpenSSL 1.0.1 (released in 2012) * GnuTLS 3.2.6 (2013) * Android 4.4.2 (2013) * Or presumably any other SSL/TLS library that is not 9+ years old * If you want to revert back to the previous less secure settings, then look under ''Previous less secure setting'' in [TLS Ciphers and protocols](https://www.unrealircd.org/docs/TLS_Ciphers_and_protocols). * The code for handling [`set::anti-flood::everyone::connect-flood`](https://www.unrealircd.org/docs/Anti-flood_settings#connect-flood) is now in its own module `connect-flood`. This module is loaded by default, no changes needed in your configuration file. * Similarly, [`set:max-unknown-connections-per-ip`](https://www.unrealircd.org/docs/Set_block#set::max-unknown-connections-per-ip) is now handled by the new module `max-unknown-connections-per-ip`. This module is loaded by default as well, no changes needed in your configuration file. * Upgrade shipped PCRE2 to 10.41, curl-ca-bundle to 2022-10-11, on Windows LibreSSL to 3.6.1 and cURL to 7.86.0. * After people do a major upgrade on their Linux distro, UnrealIRCd may no longer start due to an `error while loading shared libraries`. We now print a more helpful message and link to the new [FAQ entry](https://www.unrealircd.org/docs/FAQ#shared-library-error) about it. * When timing out on the [authprompt](https://www.unrealircd.org/docs/Set_block#set::authentication-prompt) module, the error (quit message) is now the original (ban) reason for the prompt, instead of the generic `Registration timeout`. ### Fixes: * Crash when linking. This requires a certain sequence of events: first a server is linked in successfully, then we need to REHASH, and then a new link attempt has to come in with the same server name (for example because there is a network issue and the old link has not timed out yet). If all that happens, then an UnreaIRCd 6 server may crash, but not always. * Warning message about moddata creationtime when linking. * [Snomask `+j`](https://www.unrealircd.org/docs/Snomasks) was not showing remote joins, even though it did show remote parts and kicks. * Leak of 1 file descriptor per /REHASH (the control socket). * Ban letters showing up twice in 005 EXTBAN= * Setting [set::authentication-prompt::enabled](https://www.unrealircd.org/docs/Set_block#set::authentication-prompt) to `no` was ignored. The default is still `yes`. ### Developers and protocol: * Add `CALL_CMD_FUNC(cmd_func_name)` for calling commands in the same module, see [this commit](https://github.com/unrealircd/unrealircd/commit/dc55c3ec9f19e5ed284e5a786f646d0e6bb60ef9). Benefit of this is that it will keep working if we ever change command paramters. * Add `CALL_NEXT_COMMAND_OVERRIDE()` which can be used instead of `CallCommandOverride()`, see also [this commit](https://github.com/unrealircd/unrealircd/commit/4e5598b6cf0986095f757f31a2540b03e4d235dc). This too, will keep working if we ever change command parameters. * During loading and rehash we now set `loop.config_status` to one of `CONFIG_STATUS_*` so modules (and core) can see at what step we are during configuration file and module processing. * New RPC API. See the `src/modules/rpc/` directory for examples. * New function `get_nvplist(NameValuePrioList *list, const char *name)` UnrealIRCd 6.0.4.2 ------------------- Another small update to 6.0.4.x: * Two IRCv3 specifications were ratified which we already supported as drafts: * Change CAP `draft/extended-monitor` to `extended-monitor` * Add message-tag `bot` next to existing (for now) `draft/bot` * Update Turkish translations UnrealIRCd 6.0.4.1 ------------------- This is a small update to 6.0.4. It fixes the following issues that were present in all 6.0.x versions: * Fix sporadic crash when linking a server (after successful authentication). This feels like a compiler bug. It affected only some people with GCC and only in some situations. When compiled with clang there was no problem. Hopefully we can work around it this way. * Make /INVITE bypass (nearly) all channel mode restrictions, as it used to be in UnrealIRCd 5.x. Both for invites by channel ops and for OperOverride. This also fixes a bug where an IRCOp with OperOverride could not bypass +l (limit) and other restrictions and would have to resort back to using MODE or SAMODE. Only +b and +i could be bypassed via INVITE OperOverride. (This cherry picks commit 0e6fc07bd9000ecc463577892cf2195a670de4be and commit 0d139c6e7c268e31ca8a4c9fc5cb7bfeb4f56831 from 6.0.5-git) UnrealIRCd 6.0.4 ----------------- If you are already running UnrealIRCd 6 then read below. Otherwise, jump straight to the [summary about UnrealIRCd 6](#Summary) to learn more about UnrealIRCd 6. ### Enhancements: * Show security groups in `WHOIS` * The [security-group block](https://www.unrealircd.org/docs/Security-group_block) has been expanded and the same functionality is now available in [mask items](https://www.unrealircd.org/docs/Mask_item) too: * This means the existing options like `identified`, `webirc`, `tls` and `reputation-score` can be used in `allow::mask` etc. * New options (in both security-group and mask) are: * `connect-time`: time a user is connected to IRC * `security-group`: to check another security group * `account`: services account name * `country`: country code, as found by GeoIP * `realname`: realname (gecos) of the user * `certfp`: certificate fingerprint * Every option also has an exclude- variant, eg. `exclude-country`. If a user matches any `exclude-` option then it is considered not a match. * The modules [connthrottle](https://www.unrealircd.org/docs/Connthrottle), [restrict-commands](https://www.unrealircd.org/docs/Set_block#set::restrict-commands) and [antirandom](https://www.unrealircd.org/docs/Set_block#set::antirandom) now use the new `except` sub-block which is a mask item. The old syntax (eg set::antirandom::except-webirc) is still accepted by UnrealIRCd and converted to the appropriate new setting behind the scenes (set::antirandom::except::webirc). * The modules [blacklist](https://www.unrealircd.org/docs/Blacklist_block) and [antimixedutf8](https://www.unrealircd.org/docs/Set_block#set::antimixedutf8) now also support the `except` block (a mask item). * Other than that the extended functionality is available in these blocks: `allow`, `oper`, `tld`, `vhost`, `deny channel`, `allow channel`. * Example of direct use in a ::mask item: ``` /* Spanish MOTD for Spanish speaking countries */ tld { mask { country { ES; AR; BO; CL; CO; CR; DO; EC; SV; GT; HN; MX; NI; PA; PY; PE; PR; UY; VE; } } motd "motd.es.txt"; rules "rules.es.txt"; } ``` * Example of defining a security group and using it in a mask item later: ``` security-group irccloud { mask { ip1; ip2; ip3; ip4; } } allow { mask { security-group irccloud; } class clients; maxperip 128; } except ban { mask { security-group irccloud; } type { blacklist; connect-flood; handshake-data-flood; } } ``` * Because the mask item is so powerful now, the `password` in the [oper block](https://www.unrealircd.org/docs/Oper_block) is optional now. * We now support oper::auto-login, which means the user will become IRCOp automatically if they match the conditions on-connect. This can be used in combination with [certificate fingerprint](https://www.unrealircd.org/docs/Certificate_fingerprint) authentication for example: ``` security-group Syzop { certfp "1234etc."; } oper Syzop { auto-login yes; mask { security-group Syzop; } operclass netadmin-with-override; class opers; } except ban { mask { security-group Syzop; } type all; } ``` * For [JSON logging](https://www.unrealircd.org/docs/JSON_logging) a number of fields were added when a client is expanded: * `geoip`: with subitem `country_code` (eg. `NL`) * `tls`: with subitems `cipher` and `certfp` * Under subitem `users`: * `vhost`: if the visible host differs from the realhost then this is set (thus for both vhost and cloaked host) * `cloakedhost`: this is always set (except for eg. services users), even if the user is not cloaked so you can easily search on a cloaked host. * `idle_since`: last time the user has spoken (local clients only) * `channels`: list of channels (array), with a maximum of 384 chars. * The JSON logging now also strips ASCII below 32, so color- and control codes. * Support IRCv3 `+draft/channel-context` * Add `example.es.conf` (Spanish example configuration file) * The country of users is now communicated in the [message-tag](https://www.unrealircd.org/docs/Message_tags) `unrealircd.org/geoip` (only to IRCOps). * Add support for linking servers via UNIX domain sockets (`link::outgoing::file`). ### Fixes: * Crash in `except ban` with `~security-group:xyz` * Crash if hideserver module was loaded but `LINKS` was not blocked. * Crash on Windows when using the "Rehash" GUI option. * Infinite loop if one security-group referred to another. * Duplicate entries in the `+beI` lists of `+P` channels. * Regular users were able to -o a service bot (that has umode +S) * Module manager did not stop on compile error * [`set::modes-on-join`](https://www.unrealircd.org/docs/Set_block#set::modes-on-join) did not work with `+f` + timed bans properly, eg `[3t#b1]:10` * Several log messages were missing some information. * Reputation syncing across servers had a small glitch. Fix is mostly useful for servers that were not linked to the network for days or weeks. ### Changes: * Clarified that UnrealIRCd is licensed as "GPLv2 or later" * Fix use of variables in [`set::reject-message`](https://www.unrealircd.org/docs/Set_block#set::reject-message) and in [`blacklist::reason`](https://www.unrealircd.org/docs/Blacklist_block): previously short forms of variables were (unintentionally) expanded as well, such as `$serv` for `$server`. This is no longer supported, you need to use the correct full variable names. ### Developers and protocol: * The `creationtime` is now communicated of users. Until now this information was only known locally (the thing that was communicated that came close was "last nick change" but that is not the same). This is synced via (early) moddata across servers. Module coders can use `get_connected_time()`. * The `RPL_HOSTHIDDEN` is now sent from `userhost_changed()` so you don't explicitly send it yourself anymore. * The `SVSO` command is back, so services can make people IRCOp again. See `HELPOP SVSO` or [the commit](https://github.com/unrealircd/unrealircd/commit/50e5d91c798e7d07ca0c68d9fca302a6b6610786) for more information. * Due to last change the `HOOKTYPE_LOCAL_OPER` parameters were changed. * Module coders can enhance the [JSON logging](https://www.unrealircd.org/docs/JSON_logging) expansion items for clients and channels via new hooks like `HOOKTYPE_JSON_EXPAND_CLIENT`. This is used by the geoip and tls modules. UnrealIRCd 6.0.3 ----------------- A number of serious issues were discovered in UnrealIRCd 6. Among these is an issue which will likely crash the IRCd sooner or later if you /REHASH with any active clients connected. We suggest everyone who is running UnrealIRCd 6 to upgrade to 6.0.3. Fixes: * Crash in `WATCH` if the IRCd has been rehashed at least once. After doing a `REHASH` with active clients it will likely corrupt memory. It may take several days until after the rehash for the crash to occur, or even weeks/months on smaller networks (accidental triggering, that is). * A `REHASH` with certain remote includes setups could cause a crash or other weird and confusing problems such as complaining about unable to open an ipv6-database or missing snomask configuration. This only affected some people with remote includes, not all. * Potential out-of-bounds write in sending code. In practice it seems harmless on most servers but this cannot be 100% guaranteed. * Unlikely triggered log message would log uninitialized stack data to the log file or send it to ircops. * Channel ops could not remove halfops from a user (`-h`). * After using the `RESTART` command (not recommended) the new IRCd was often no longer writing to log files. * Fix compile problem if you choose to use cURL remote includes but don't have cURL on the system and ask UnrealIRCd to compile cURL. Enhancements: * The default text log format on disk changed. It now includes the server name where the event was generated. Without this, it was sometimes difficult to trace problems, since previously it sometimes looked like there was a problem on your server when it was actually another server on the network. * Old log format: `[DATE TIME] subsystem.EVENT_ID loglevel: ........` * New log format: `[DATE TIME] servername subsystem.EVENT_ID loglevel: ........` Changes: * Any MOTD lines added by services via [`SVSMOTD`](https://www.unrealircd.org/docs/MOTD_and_Rules#SVSMOTD) are now shown at the end of the MOTD-on-connect (unless using a shortmotd). Previously the lines were only shown if you manually ran the `MOTD` command. Developers and protocol: * `LIST Cchname` is `channel->name` now. * get_channel() is now make_channel() and creates if needed, otherwise use find_channel() * The Extended Ban API has been changed a lot. We use a `BanContext` struct now that we pass around a lot. You also don't need to do `+3` magic anymore on the string as it is handled in another layer. When registering the extended ban, `.flag` is now `.letter`, and you also need to set a `.name` to a string due to named extended bans. Have a look at the built-in extban modules to see how to handle the changes. * ModData now has an option `MODDATA_SYNC_EARLY`. See under *Server protocol*. * If you want to lag someone up, don't touch `client->since`, but instead use: `add_fake_lag(client, msec)` * Some client/user struct changes, with `client->user->account` (instead of svid) and `client->uplink->name` being the most important ones. * Possibly more, but above is like 90%+ of the changes that you will encounter. Server protocol ---------------- * When multiple related `SJOIN` messages are generated for the same channel then we now only send the current channel modes (eg `+sntk key`) in the first SJOIN and not in the other ones as they are unneeded for the immediate followup SJOINs, they waste unnecessary bytes and CPU. Such messages may be generated when syncing a channel that has dozens of users and/or bans/exempts/invexes. Ideally this should not need any changes in other software, since we already supported such messages in the past and code for handling it exists way back to 3.2.x, but you better check to be sure! * If you send `PROTOCTL NEXTBANS` then you will receive extended bans with Named EXTended BANs instead of letters (eg: `+b ~account:xyz`), otherwise you receive them with letters (eg: `+b ~a:xyz`). * Some ModData of users is (also) communicated in the `UID` message while syncing using a message tag that only appears in server-to-server traffic, `s2s-md/moddataname=value`. Thus, data such as operinfo, tls cipher, geoip, certfp, sasl and webirc is communicated at the same time as when a remote connection is added. This makes it that a "connecting from" server notice can include all this information and also so code can make an immediate decission on what to do with the user in hooks. ModData modules need to set `mreq.sync = MODDATA_SYNC_EARLY;` if they want this. Servers of course need to enable `MTAGS` in PROTOCTL to see this. * The `SLOG` command is used to broadcast logging messages. This is done for log::destination remote, as used in doc/conf/snomasks.default.conf, for example for link errors, oper ups, flood messages, etc. It also includes all JSON data in a message tag when `PROTOCTL MTAGS` is used. * Bounced modes are gone: these were MODEs that started with a `&` which servers were to act on with reversed logic (add becoming remove and vice versa) and never to send something back to that server. In practice this was almost never used and complicated the code (way) too much. Client protocol ---------------- * Extended bans now have names instead of letters. If a client sends the old format with letters (eg `+b ~a:XYZ`) then the server will convert it to the new format with names (eg: `+b ~account:XYZ`) * Support for `MONITOR` and the other IRCv3 features (see *Enhancements*)