Commit Briefs
Implement new configuration option "DefaultChannelModes" (master)
The new configuration option "DefaultChannelModes" lists channel modes that become automatically set on new channels on creation. Default: set no modes. Closes #333.
Handle clients which erroneously send passwords for non-password protected servers
Ignore passwords sent by clients when not configured/needed. Closes #332.
Improve "CloakHostModeX" documentation
Closes #334.
Use the last value set for "Listen" (Global) and "Mask" (Operator)
Do not ignore newer configuration value, always use the latest value set. And do not assert() SSL-related string options and break, but properly free them and use the latest value set – even in debug mode. In non-debug mode, this was already the case anyway, but we leaked some memory ...
Update documentation on CAFile
ngIRCd 27 now checks server certificates, and without `CAFile` set will reject all server/server connections with a confusing error. Update documentation to say that `CAFile` is needed to accept incoming server connections. Closes #320.
MODE: Reply with ERR_NOSUCHCHANNEL when the target is a channel (#319)
While it is common for IRC servers to use ERR_NOSUCHNICK instead of ERR_NOSUCHCHANNEL when a target can be either a channel or a nick, it seems every other IRCd but UnrealIRCd uses ERR_NOSUCHCHANNEL in this particular case.
Explicitely cast NumConnections etc. (size_t) to "long"
This fixes the following compiler warning, for example on OpenSolaris: conn.c: In function 'Conn_Handler': conn.c:798:28: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
Fix channel symbol returned by RPL_NAMREPLY for secret channels
References: - https://modern.ircdocs.horse/#rplnamreply-353 - https://datatracker.ietf.org/doc/html/rfc2812#page-47 - (RFC 1459 is irrelevant here, as https://datatracker.ietf.org/doc/html/rfc1459#page-51 uses a different format) Closes #313.
Don't abort startup when setgid/setuid() fails with EINVAL
Both setgid(2) as well as setuid(2) can fail with EINVAL in addition to EPERM, their manual pages state "EINVAL: The user/group ID specified in uid/gid is not valid in this user namespace ". So not only treat EPERM as an "acceptable error" and continue with logging the error, but do the same for EINVAL. This was triggered by the Void Linux xbps-uunshare(1) tool used for building "XBPS source packages" and reported by luca in #ngircd. Thanks!
Test suite: Don't use "pgrep -u" when LOGNAME and USER are not set
Thanks for reporting this on IRC, luca!
Test suite: Use $USER in getpid.sh when $LOGNAME is not set
The LOGNAME environment variable is not set in GitHub "actions", for example ...
Ping the service manager and set a status message
Periodically "ping" the service manager (every 3 seconds) and set a status message showing connection statistics. This enables using the systemd(8) watchdog functionality for the "ngircd.service" unit.
