]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
7 weeks agoINSTALL.md: Add info for macOS systems
Alexander Barton [Sun, 17 Mar 2024 18:51:43 +0000 (19:51 +0100)]
INSTALL.md: Add info for macOS systems

7 weeks agoMETATADA: Fix unsetting "cloakhost"
Alexander Barton [Sun, 17 Mar 2024 14:55:39 +0000 (15:55 +0100)]
METATADA: Fix unsetting "cloakhost"

Correctly re-generate the "cloaked hostname" when removing the
"cloakhost" using an empty string by passing down NULL instead of the
empty string, which results in protocol violations (for example on
WHOIS).

7 weeks agoUpdate the "rpm" make target to use rpmbuild(8)
Alexander Barton [Sat, 10 Feb 2024 00:13:43 +0000 (01:13 +0100)]
Update the "rpm" make target to use rpmbuild(8)

7 weeks agoAdd a Dockerfile and documentation to the project
Alexander Barton [Fri, 9 Feb 2024 21:58:44 +0000 (22:58 +0100)]
Add a Dockerfile and documentation to the project

2 months agoStreamline the "testsuite" and "srcdoc" make targets
Alexander Barton [Fri, 9 Feb 2024 23:03:13 +0000 (00:03 +0100)]
Streamline the "testsuite" and "srcdoc" make targets

2 months agoRemove outdated, unsupported and broken support for splint(1)
Alexander Barton [Fri, 9 Feb 2024 23:00:19 +0000 (00:00 +0100)]
Remove outdated, unsupported and broken support for splint(1)

2 months agoGit: Streamline and simplify .gitignore file
Alexander Barton [Fri, 9 Feb 2024 21:54:17 +0000 (22:54 +0100)]
Git: Streamline and simplify .gitignore file

2 months agoConvert contrib/README to Markdown
Alexander Barton [Fri, 9 Feb 2024 21:47:05 +0000 (22:47 +0100)]
Convert contrib/README to Markdown

3 months agoDoxygen: Update the footer links
Alexander Barton [Wed, 31 Jan 2024 20:03:44 +0000 (21:03 +0100)]
Doxygen: Update the footer links

3 months agotestsuite: Pass -nameopt to openssl s_client.
Sebastian Andrzej Siewior [Tue, 30 Jan 2024 20:26:16 +0000 (21:26 +0100)]
testsuite: Pass -nameopt to openssl s_client.

The default value for the -nameopt option changed in OpenSSL 3.2 from
`oneline' to `utf8'. The `oneline' option also included a space around
the fields which is not the case for `utf8'. This means that
CN = my.first.domain.tld

changed to

CN=my.first.domain.tld

and is now longer recognized, leading to test failure.
This can be fixed by either going back to `oneline' or keeping `utf8'
and adding additionally `space_eq'. Anoter way would be to teach the
expect that the space is optional.

Add explicit -nameopt option with `utf8,space_eq' which is understood by
by OpenSSL 3.2 and earlier to make explicit. Remove the wildcard.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
3 months agoDebian package: Enable the [SSL] section
Alexander Barton [Tue, 23 Jan 2024 21:25:28 +0000 (22:25 +0100)]
Debian package: Enable the [SSL] section

This makes sense because the package is build with SSL support enabled,
and we set and enable "CAFile" in commit ae9cfade -- which results in an
error when this is not in an enabled(!) [SSL] section ...

3 months ago2nd attempt to always show the correct config file name ...
Alexander Barton [Tue, 23 Jan 2024 21:20:21 +0000 (22:20 +0100)]
2nd attempt to always show the correct config file name ...

But we are getting there!

3 months agoTestsuite: Test for the openssl command before using it
Alexander Barton [Tue, 23 Jan 2024 13:41:48 +0000 (14:41 +0100)]
Testsuite: Test for the openssl command before using it

And skip the tests calling it instead of failing!

3 months agoCorrectly show the configuration file used
Alexander Barton [Tue, 23 Jan 2024 13:41:21 +0000 (14:41 +0100)]
Correctly show the configuration file used

3 months agoINSTALL.md: Add info for current Red Hat/Fedora systems
Alexander Barton [Sun, 21 Jan 2024 19:14:42 +0000 (20:14 +0100)]
INSTALL.md: Add info for current Red Hat/Fedora systems

3 months agoMigrate info from INSTALL.md into doc/QuickStart.md
Alexander Barton [Sun, 21 Jan 2024 19:10:42 +0000 (20:10 +0100)]
Migrate info from INSTALL.md into doc/QuickStart.md

Move most information regarding configuring ngIRCd into the
doc/QuickStart.md document, only describe building and installing ngIRCd
in the INSTALL.md file. Don't duplicate content!

Add references where this makes sense.

3 months agoDon't show the default config file name on config errors
Alexander Barton [Sun, 21 Jan 2024 18:58:01 +0000 (19:58 +0100)]
Don't show the default config file name on config errors

The configuration can be set in drop-in files in the include directory,
too, so it is not clear in which file it is actually missing.

3 months agoUse a default "IncludeDir" only when no config file was specified
Alexander Barton [Sun, 21 Jan 2024 18:41:39 +0000 (19:41 +0100)]
Use a default "IncludeDir" only when no config file was specified

No longer use a default built-in value for the "IncludeDir" directive
when a configuration file was explicitly specified on the command line
using "--config"/"-f": This way no default include directory is scanned
when a possibly non-default configuration file is used which
(intentionally) did not specify an "IncludeDir" directive.

With this patch you now can use "-f /dev/null" for checking all built-in
defaults, regardless of any local configuration files in the default
drop-in directory (which would have been read in until this change).

3 months agoAdd an introduction and generic info to doc/QuickStart.md
Alexander Barton [Sun, 21 Jan 2024 01:56:23 +0000 (02:56 +0100)]
Add an introduction and generic info to doc/QuickStart.md

3 months agoDebian package: Configure the system CA certificates store
Alexander Barton [Sun, 21 Jan 2024 13:13:33 +0000 (14:13 +0100)]
Debian package: Configure the system CA certificates store

3 months agoDo not log channel keys ("passwords") for predefined channels
Alexander Barton [Sun, 21 Jan 2024 13:12:19 +0000 (14:12 +0100)]
Do not log channel keys ("passwords") for predefined channels

3 months agoCI: Fix YAML, there shouldn't have been tabs in the file!
Alexander Barton [Sun, 21 Jan 2024 00:48:15 +0000 (01:48 +0100)]
CI: Fix YAML, there shouldn't have been tabs in the file!

3 months agoCI: Looks like "cache-apt-pkgs-action" needs exact package names
Alexander Barton [Sun, 21 Jan 2024 00:36:05 +0000 (01:36 +0100)]
CI: Looks like "cache-apt-pkgs-action" needs exact package names

And list only one package per line; way easier to read and maintain :-)

3 months ago"ngIRCd CI" GitHub Action: Update and use cache-apt-pkgs-action
Alexander Barton [Sun, 21 Jan 2024 00:20:14 +0000 (01:20 +0100)]
"ngIRCd CI" GitHub Action: Update and use cache-apt-pkgs-action

3 months agoMake the description of the "Info" option more precise
Alexander Barton [Sat, 20 Jan 2024 22:07:25 +0000 (23:07 +0100)]
Make the description of the "Info" option more precise

The "Info" option in the "[Global]" section is optional (so comment it
out in the sample configuration file) and set to the server software
name and its version when not set (so add this information to the sample
configuration file and the ngircd.conf(5) manual page).

3 months agoDeduce a server name when not set in the configuration
Alexander Barton [Sat, 20 Jan 2024 22:04:32 +0000 (23:04 +0100)]
Deduce a server name when not set in the configuration

The server "Name" in the "[Global]" section of the configuration file is
optional now: When not set (or empty), ngIRCd now tries to deduce a
valid IRC server name from the local host name ("node name"), possibly
adding a ".host" extension when the host name does not contain a dot
(".") which is required in an IRC server name ("ID").

This new behaviour, with all configuration parameters now being
optional, allows running ngIRCd without any configuration file at all.

3 months agoExplicitly test for the empty string in Channel_UserHasMode()
Alexander Barton [Sat, 20 Jan 2024 15:14:01 +0000 (16:14 +0100)]
Explicitly test for the empty string in Channel_UserHasMode()

Basically this is unnecessary, as Channel_UserModes() always returns a
valid pointer and strchr() can deal with an empty (NULL-terminated)
string perfectly fine, bit it makes the code a bit more obvious and
silences the following warning:

  In function ‘Channel_UserHasMode’,
      inlined from ‘Channel_Kick’ at channel.c:384:7:
  channel.c:784:16: warning: ‘strchr’ reading 1 or more bytes from a region
                    of size 0 [-Wstringop-overread]
    784 |         return strchr(Channel_UserModes(Chan, Client), Mode) != NULL;
        |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This was seen with "gcc (Debian 12.2.0-14) 12.2.0" at least.

3 months agoUpdate the AUTHORS.md file
Alexander Barton [Sat, 20 Jan 2024 14:56:56 +0000 (15:56 +0100)]
Update the AUTHORS.md file

3 months agoUpdate the mailing list address to ngircd@lists.barton.de
Alexander Barton [Sat, 20 Jan 2024 14:37:50 +0000 (15:37 +0100)]
Update the mailing list address to ngircd@lists.barton.de

3 months agoConvert the AUTHORS file to Markdown
Alexander Barton [Sat, 20 Jan 2024 13:03:17 +0000 (14:03 +0100)]
Convert the AUTHORS file to Markdown

3 months agoUpdate included Debian package configuration
Alexander Barton [Fri, 19 Jan 2024 21:07:38 +0000 (22:07 +0100)]
Update included Debian package configuration

- Rewrite using current dh_make.
- Standards-Version: 4.6.2.
- No longer build 3 different packages; only build "ngircd" which now
  includes support for IDENT, PAM (disabled in the ngircd.conf installed
  by the package), SSL (OpenSSL), ZLib and IPv6.
- Update package description accordingly.
- No longer install a SysV init file, only install ngircd.service unit.

3 months agoRemove outdated and obsolete targets from the toplevel Makefile
Alexander Barton [Fri, 19 Jan 2024 21:14:47 +0000 (22:14 +0100)]
Remove outdated and obsolete targets from the toplevel Makefile

This affects targets for Apple Xcode and Package Maker, which both are
no longer supported/included in the ngIRCd distribution.

See commits 0652c99b and 07219281, this is a leftover ...

3 months agoUse -Werror when testing for -Wno-format-truncation
Alexander Barton [Fri, 19 Jan 2024 15:55:23 +0000 (16:55 +0100)]
Use -Werror when testing for -Wno-format-truncation

Clang does not know the -Wno-format-truncation option of (current) GCC,
but accepts unknown -W... options (exit core 0) but issues a warning
message on every invocation. So for example on macOS, where Clang is
used as "gcc", a new warning message was shown for every file to
compile, since we enabled -Wno-format-truncation in commit 1d527eaf:

  warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]

Clang no longer acceps unknown -W... options by enabling -Werror, which
this patch adds to the CFLAGS while testing for -Wno-format-truncation,
which fixes this issue.

This fixes commit 1d527eaf.

3 months agoAnnotate "fall through" cases to silence warnings
Alexander Barton [Thu, 18 Jan 2024 21:41:39 +0000 (22:41 +0100)]
Annotate "fall through" cases to silence warnings

Add a "/* fall through */" annotation to "case" statements which
actually should "fall through" to silences GCC warning like this:

  hash.c: In function ‘jenkins_hash’:
  hash.c:110:27: warning: this statement may fall through
                 [-Wimplicit-fallthrough=]
    110 |                 case 12: c+=((UINT32)k[11])<<24;
        |                          ~^~~~~~~~~~~~~~~~~~~~~

3 months agoDisable GCC -Wformat-truncation when suported
Alexander Barton [Thu, 18 Jan 2024 21:39:10 +0000 (22:39 +0100)]
Disable GCC -Wformat-truncation when suported

Pass -Wno-format-truncation when this is supported by GCC so silence
warnings like this:

  conf.c: In function ‘Read_Config’:
  conf.c:985:60: warning: ‘snprintf’ output may be truncated before
                 the last format character [-Wformat-truncation=]
    985 |                         snprintf(file, sizeof(file), "%s/%s",
        |                                                            ^
  conf.c:985:25: note: ‘snprintf’ output 2 or more bytes (assuming 257)
                 into a destination of size 256
    985 |                         snprintf(file, sizeof(file), "%s/%s",
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    986 |                                  Conf_IncludeDir, entry->d_name);
        |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The warning is correct, but this is basically why we use snprintf() in
the first place.

3 months agoSpelling fixes, mostly in file comments
Alexander Barton [Fri, 30 Dec 2022 14:37:35 +0000 (15:37 +0100)]
Spelling fixes, mostly in file comments

3 months agoautogen.sh: Prefere automake 1.11 over other releases
Alexander Barton [Tue, 16 Jan 2024 16:33:54 +0000 (17:33 +0100)]
autogen.sh: Prefere automake 1.11 over other releases

GNU automake 1.11 is the last release supporting "de-ANSI-fication"
using the included ansi2knr tool. And becuase we _want_ to support old
K&R platforms, we try hard to use this release of automake when
available to generate our build system.

3 months agoAutodetect support for IPv6 by default
Alexander Barton [Mon, 15 Jan 2024 21:14:15 +0000 (22:14 +0100)]
Autodetect support for IPv6 by default

Until now, IPv6 support was disabled by default, which seems a bit
outdated in 2024. Note: You still can pass "--enable-ipv6" or
"--disable-ipv6" to the ./configure script to forcefully activate or
deactivate IPv6 support.

3 months agoDo IDENT requests even when DNS lookups are disabled
Alexander Barton [Mon, 15 Jan 2024 20:12:10 +0000 (21:12 +0100)]
Do IDENT requests even when DNS lookups are disabled

Without this patch, disabling DNS in the configuration disabled IDENT
lookups as well (for no good reason).

This patch allows enabling/disabling DNS lookups and IDENT requests
completely separately and enhances the messages sent to the client when
"NoticeBeforeRegistration" is enabled, too.

Thanks for reporting this, Miniontoby!

Closes #291.

3 months agoStart preparing the ChangeLog for the next release ...
Alexander Barton [Thu, 11 Jan 2024 13:56:03 +0000 (14:56 +0100)]
Start preparing the ChangeLog for the next release ...

3 months agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Thu, 11 Jan 2024 13:51:27 +0000 (14:51 +0100)]
Update config.guess and config.sub to recent versions

- config.guess: 2023-08-22
- config.sub: 2023-09-19

3 months agoChannel Admins are not allowed to set Channel Owner status!
Alexander Barton [Tue, 9 Jan 2024 15:36:10 +0000 (16:36 +0100)]
Channel Admins are not allowed to set Channel Owner status!

This was reported back in April 2021, thanks Sarah!

    Subject: NGIRCD bug report
    Date: April 28 2021, 14:30:08 MESZ
    To: alex@barton.de

    Hello,

    I am writing to you to report a bug in ngircd.
    In any give channel, if an user is with mode +a (admin), he/she can
    sets mode +/-q(owner) to any other user. This is not inline with the
    documentation.

    I've looked into the code irc-mode.c, apparently an if block is
    missing. Below are the code snippets that I believe fixes the bug.

This patch is what Sarah sent in. Thanks a lot!

3 months agoConvert the FAQ to Markdown and enhance it!
Alexander Barton [Tue, 9 Jan 2024 14:52:34 +0000 (15:52 +0100)]
Convert the FAQ to Markdown and enhance it!

3 months agoTest suite: Update for OpenSSL 3.x
Alexander Barton [Mon, 8 Jan 2024 22:11:33 +0000 (23:11 +0100)]
Test suite: Update for OpenSSL 3.x

3 months agoAllow SSL client-only configurations without keys/certificates
Alexander Barton [Sat, 6 Jan 2024 18:53:33 +0000 (19:53 +0100)]
Allow SSL client-only configurations without keys/certificates

You don't need to configure certificates/keys as long as you don't
configure SSL-enabled listening ports.

This can make sense when you want to only link your local daemon to an
uplink server using SSL and only have clients on your local host or in
you fully trusted network, where SSL is not required.

3 months agoRemove unmaintained contrib/MacOSX/ folder
Alexander Barton [Mon, 8 Jan 2024 21:16:52 +0000 (22:16 +0100)]
Remove unmaintained contrib/MacOSX/ folder

This includes removing the Xcode project.

The sample launchd(8) configuration properties list file was moved to
"contrib/de.barton.ngircd.plist" and kept.

3 months agoQuickStart.md: Update title and fix Markdown syntax
Alexander Barton [Mon, 8 Jan 2024 20:08:18 +0000 (21:08 +0100)]
QuickStart.md: Update title and fix Markdown syntax

3 months agoUpdate the project description, enhance & fix the README.md
Alexander Barton [Mon, 8 Jan 2024 20:07:33 +0000 (21:07 +0100)]
Update the project description, enhance & fix the README.md

3 months ago2024 =:)
Alexander Barton [Mon, 8 Jan 2024 15:38:45 +0000 (16:38 +0100)]
2024 =:)

4 months agoFix showing the "Ident" option in --configtest output
Alexander Barton [Sat, 6 Jan 2024 14:50:33 +0000 (15:50 +0100)]
Fix showing the "Ident" option in --configtest output

We tested for the wrong #define ... ooops!

4 months agoChange GnuTLS "slot handling" messages to debug level
Alexander Barton [Fri, 5 Jan 2024 21:22:20 +0000 (22:22 +0100)]
Change GnuTLS "slot handling" messages to debug level

Those messages are about an internal implementation detail, not relevant
for an administrator of ngIRCd.

4 months agoEnlarge buffer for log messages
Alexander Barton [Fri, 5 Jan 2024 21:18:17 +0000 (22:18 +0100)]
Enlarge buffer for log messages

For example, SSL/TLS certificate information can easily get longer than
256 characters. So enlarge the log buffer to 1 KB.

4 months agoRespect "SSLConnect" option for incoming connections
Alexander Barton [Mon, 1 Jan 2024 17:20:26 +0000 (18:20 +0100)]
Respect "SSLConnect" option for incoming connections

Don't accept incoming plain-text ("non SSL") server connections for
servers configured with "SSLConnect" enabled.

If "SSLConnect" is not set for an incoming connection the server still
accepts both plain-text and encrypted connections.

This change prevents an authenticated client-server being able to force
the server-server to send its password on a plain-text connection when
SSL/TLS was intended.

4 months agoAlways initiate closing a connection on errors.
Alexander Barton [Fri, 24 Nov 2023 17:16:36 +0000 (18:16 +0100)]
Always initiate closing a connection on errors.

Always try to close a connection with errors immediately, but try hard
to avoid too much recursion.

Without this patch, an outgoing server connection could get stuck in an
"endless" state trying to write out data over and over again.

This tries to fix 04de1423eb26.

6 months agoAdd "hopm.service" to "Wants" and "Before" dependencies in systemd unit file
Alexander Barton [Tue, 17 Oct 2023 14:15:38 +0000 (16:15 +0200)]
Add "hopm.service" to "Wants" and "Before" dependencies in systemd unit file

7 months agoUpdate Debian package configuration
Alexander Barton [Sun, 17 Sep 2023 21:42:08 +0000 (23:42 +0200)]
Update Debian package configuration

This not only bumps the "compat" version, but updates the package
dependencies and build rules accordingly.

Closes #299.

7 months agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sun, 17 Sep 2023 21:39:05 +0000 (23:39 +0200)]
Update config.guess and config.sub to recent versions

- config.guess: 2022-01-09
- config.sub: 2022-01-03

7 months agoReturn ERR_NOTEXTTOSEND on empty PRIVMSG content
Valentin Lorentz [Sun, 3 Sep 2023 08:05:54 +0000 (10:05 +0200)]
Return ERR_NOTEXTTOSEND on empty PRIVMSG content

They are dropped further down the line anyway; and sending ERR_NOTEXTTOSEND
early matches other servers' behavior.

7 months agoUpdate and enhance the manual pages a bit
Alexander Barton [Sun, 17 Sep 2023 20:03:12 +0000 (22:03 +0200)]
Update and enhance the manual pages a bit

7 months agoMerge branch 'katp32/master'
Alexander Barton [Sun, 17 Sep 2023 19:37:45 +0000 (21:37 +0200)]
Merge branch 'katp32/master'

Thanks Katherine Peeters for the patch and pull request!

Closes #294.

* katp32/master:
  Improve documentation for --syslog
  Added command line flag to enable syslog
  Split NoSyslog from behaviour of NoDaemon

7 months agoConf_Test(): Use yesno_to_str() instead of individual tests and output
Alexander Barton [Sun, 17 Sep 2023 18:28:52 +0000 (20:28 +0200)]
Conf_Test(): Use yesno_to_str() instead of individual tests and output

7 months agoChannel autojoin: Add missing variable in --configtest output
Alexander Barton [Sun, 17 Sep 2023 18:27:14 +0000 (20:27 +0200)]
Channel autojoin: Add missing variable in --configtest output

7 months agoSilence compiler warning in Init_New_Client()
Alexander Barton [Sun, 17 Sep 2023 18:16:35 +0000 (20:16 +0200)]
Silence compiler warning in Init_New_Client()

Use strdup() instead of pointless strndup() to fix the following
compiler warning:

client.c: In function ‘Init_New_Client’:
client.c:216:32: warning: ‘strndup’ specified bound 127 exceeds source size 5 [-Wstringop-overread]
  216 |                 client->away = strndup(DEFAULT_AWAY_MSG, CLIENT_AWAY_LEN - 1);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

7 months agoVarious fixes and enhancements for the "Autojoin" patch
Alexander Barton [Sun, 17 Sep 2023 17:38:53 +0000 (19:38 +0200)]
Various fixes and enhancements for the "Autojoin" patch

- Bring sample-ngircd.conf and ngircd.conf.5 description in line.
- Fix configuration parsing, it always showed the 'Unknown variable
  "Autojoin"' error message, even when everything was perfectly fine.
- And fix a build error (at least on macOS with Apple Clang 14):
    login.c:234:3: error: call to undeclared function 'IRC_JOIN'; ISO
    C99 and later do not support implicit function declarations
    [-Wimplicit-function-declaration]
       IRC_JOIN(Client, &Req);
       ^
  The #include for the "irc.channel.h" header was missing!
- Remove a unused variable that caused a compiler warning:
    login.c:222:12: warning: unused variable 'n' [-Wunused-variable]
       size_t i, n, channel_count = array_length(&Conf_Channels, sizeof(*conf_chan));
                 ^
- Add a explicit cast to fix a compiler warning:
    login.c:235:15: warning: assigning to 'char *' from 'const char[51]'
    discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
       Req.argv[0] = conf_chan->name;
                   ^ ~~~~~~~~~~~~~~~

7 months agoChannel autojoin functionality
Ivan Agarkov [Sun, 13 Dec 2020 18:57:41 +0000 (21:57 +0300)]
Channel autojoin functionality

9 months ago2023!
Alexander Barton [Thu, 3 Aug 2023 12:22:53 +0000 (14:22 +0200)]
2023!

9 months agoHide +i users on "WHOIS <pattern>"
Alexander Barton [Thu, 3 Aug 2023 08:57:27 +0000 (10:57 +0200)]
Hide +i users on "WHOIS <pattern>"

Let's behave like most(?) other IRC daemons (at least ircd2.11) and hide
all +i users when WHOIS is used with a pattern. Otherwise privacy of
this users is not guaranteed and the +i mode a bit useless ...

Reported by Cahata on #ngircd, thanks!

9 months agoUpdate the final "closing connection" message
Alexander Barton [Tue, 18 Jul 2023 09:45:01 +0000 (11:45 +0200)]
Update the final "closing connection" message

Add some more information (nick name, user name, host name) and bring it
in line with some other implementations (at least ircd2.11 and Hybrid).

9 months agoFix RPL_INVITING message: It must originate from the server
Alexander Barton [Tue, 18 Jul 2023 09:42:07 +0000 (11:42 +0200)]
Fix RPL_INVITING message: It must originate from the server

All numeric replies must originate from an IRC server, never from a
client. So fix the RPL_INVITING message!

Thanks tommyrot for reporting this!

Closes #307.

10 months agoEnhance log messages for refused connections
Alexander Barton [Wed, 5 Jul 2023 09:03:02 +0000 (11:03 +0200)]
Enhance log messages for refused connections

15 months agoconfigure.ng: Include <string.h> for memset in WORKING_GETADDRINFO probe
Florian Weimer [Thu, 2 Feb 2023 08:56:42 +0000 (09:56 +0100)]
configure.ng: Include <string.h> for memset in WORKING_GETADDRINFO probe

Otherwise, the probe always fails with compilers which do not
support implicit function declarations.

16 months agoAdd "+DEBUG" to the version string only when configured with --enable-debug
Alexander Barton [Mon, 2 Jan 2023 22:51:15 +0000 (23:51 +0100)]
Add "+DEBUG" to the version string only when configured with --enable-debug

The debug log messages are always available and a runtime option (since
commit c7de505c), but the assert()'s are only active when ngIRCd was
configured with the "--enable-debug" option.

So only add "+DEBUG" to the version string when the latter is the case.

16 months agoMake the debug loglevel always available
michi [Sun, 1 Jan 2023 12:12:54 +0000 (13:12 +0100)]
Make the debug loglevel always available

This basically means to unifdef DEBUG in (almost) all places.
We keep it in src/portab/portab.h so DEBUG stays available to
enable assert(). Also add a comment about this.

16 months agoBetter validate MODE +k & +l parameters and return errors
Alexander Barton [Mon, 2 Jan 2023 21:32:16 +0000 (22:32 +0100)]
Better validate MODE +k & +l parameters and return errors

Implement new numeric ERR_INVALIDMODEPARAM_MSG(696) and:

- Reject channel keys with spaces and return ERR_INVALIDMODEPARAM_MSG;
  This was possible until now and resulted in garbled IRC commands later.
- Reject empty channel keys and return ERR_INVALIDMODEPARAM_MSG;
  This was possible until now and resulted in garbled IRC commands later.
- Return ERR_INVALIDMODEPARAM_MSG when user limit is out of bounds;
  This was silently ignored until now.

Closes #290. Thanks Val Lorentz for reporting it!

16 months agoChannel modes +k & +l: Always report an error when a parameter is missing
Alexander Barton [Mon, 2 Jan 2023 20:42:04 +0000 (21:42 +0100)]
Channel modes +k & +l: Always report an error when a parameter is missing

This relates to #290 and considerations which errors to show when: and I
think it is the better approach to give feedback instead of silently
failing.

Note that this code path is also used when handling modes of channels
defined in "[Channel]" blocks in configuration files: in this case the
client is the local server and we can't send messages to it, because it
has no socket connection! Therefore we need those "is_machine" checks
and log an error im this case.

16 months agoRefactor Channel_Mode(), get rid of some nesting
Alexander Barton [Mon, 2 Jan 2023 20:25:28 +0000 (21:25 +0100)]
Refactor Channel_Mode(), get rid of some nesting

No functional changes.

16 months agoAllow ircops to use WHO on any channel.
michi [Tue, 23 Mar 2021 09:08:58 +0000 (10:08 +0100)]
Allow ircops to use WHO on any channel.

16 months agoRemove outdated macOS "Package Maker" configuration
Alexander Barton [Thu, 29 Dec 2022 17:03:10 +0000 (18:03 +0100)]
Remove outdated macOS "Package Maker" configuration

The tool is unavailable for many macOS versions and many years, so
remove all related files.

16 months agoWe no longer use Travis-CI, remove its configuration
Alexander Barton [Thu, 29 Dec 2022 15:48:50 +0000 (16:48 +0100)]
We no longer use Travis-CI, remove its configuration

16 months agoGitHub "ngIRCd CI" Action: Use sudo(8) when installing packages
Alexander Barton [Thu, 29 Dec 2022 15:01:52 +0000 (16:01 +0100)]
GitHub "ngIRCd CI" Action: Use sudo(8) when installing packages

16 months agoAdd "ngIRCd CI" GitHub Action
Alexander Barton [Thu, 29 Dec 2022 14:58:19 +0000 (15:58 +0100)]
Add "ngIRCd CI" GitHub Action

16 months agoRefactor join_send_topic() into IRC_Send_Channel_Info() and use it for JOIN and NJOIN... bug288-Send-NAMES-TOPIC-to-NJOINed-users
Alexander Barton [Mon, 26 Dec 2022 16:38:10 +0000 (17:38 +0100)]
Refactor join_send_topic() into IRC_Send_Channel_Info() and use it for JOIN and NJOIN handlers

This reduces code duplication and brings the order of messages on JOIN
and NJOIN in line.

Fixes #288.

16 months agoSend NAMES list and channel topic to NJOIN'ed users
ewired [Fri, 16 Apr 2021 18:28:00 +0000 (13:28 -0500)]
Send NAMES list and channel topic to NJOIN'ed users

Send the NAMES list and channel topic to users "forcefully" joined to a
channel using NJOIN, like they joined on their own using JOIN.

Closes #288.

16 months agoChannel mode setting: The local server is allowed to work on local channels
Alexander Barton [Mon, 26 Dec 2022 16:32:59 +0000 (17:32 +0100)]
Channel mode setting: The local server is allowed to work on local channels

Don't forbid the local server to change modes on local channels: this
happens when overriding modes on local (&) channels in the server
configuration file, for example, and is perfectly fine.

Without this patch, the server worked as expected but showed critical
error messages for each local channel in its configuration file:

  "Got remote MODE command for local channel!? Ignored."

16 months agoUpdate Xcode project for latest Xcode version (14.2)
Alexander Barton [Sun, 25 Dec 2022 14:53:36 +0000 (15:53 +0100)]
Update Xcode project for latest Xcode version (14.2)

16 months agoREADME.md: Update "status" section, remove "is being actively developed" ...
Alexander Barton [Sun, 25 Dec 2022 14:20:00 +0000 (15:20 +0100)]
README.md: Update "status" section, remove "is being actively developed" ...

16 months agoSpelling fixes, mostly in file comments
Alexander Barton [Sun, 25 Dec 2022 14:16:31 +0000 (15:16 +0100)]
Spelling fixes, mostly in file comments

16 months agoUse "||" instead of "|"
hello-smile6 [Wed, 14 Dec 2022 20:33:03 +0000 (12:33 -0800)]
Use "||" instead of "|"

16 months agoFix gline/kline with cloaked hostnames
9pfs [Tue, 13 Dec 2022 00:47:53 +0000 (00:47 +0000)]
Fix gline/kline with cloaked hostnames

16 months agoConvert uses of Log(LOG_DEBUG, ...) to LogDebug()
Jules Maselbas [Tue, 26 Apr 2022 13:41:28 +0000 (15:41 +0200)]
Convert uses of Log(LOG_DEBUG, ...) to LogDebug()

18 months agoImprove documentation for --syslog
Katherine Peeters [Tue, 1 Nov 2022 23:21:56 +0000 (16:21 -0700)]
Improve documentation for --syslog

18 months agofix typo in conn.c
salaaad2 [Thu, 27 May 2021 16:19:30 +0000 (18:19 +0200)]
fix typo in conn.c

18 months agoAdded command line flag to enable syslog
Katherine Peeters [Sun, 30 Oct 2022 04:46:46 +0000 (21:46 -0700)]
Added command line flag to enable syslog

This allows -y / --syslog to be used to override -n / --nodaemon disabling it

18 months agoSplit NoSyslog from behaviour of NoDaemon
Katherine Peeters [Sun, 30 Oct 2022 04:33:18 +0000 (21:33 -0700)]
Split NoSyslog from behaviour of NoDaemon

Allows syslog to be enabled/disabled seperately from daemonization

2 years ago2022 =:)
Alexander Barton [Sat, 1 Jan 2022 15:05:09 +0000 (16:05 +0100)]
2022 =:)

Happy new year!

2 years agoFix a possible race condition in Client_Introduce()
Alexander Barton [Thu, 30 Dec 2021 19:31:41 +0000 (20:31 +0100)]
Fix a possible race condition in Client_Introduce()

Conf_GetServer() can return NULL when the server introducing the client
had a write error for example, and is being disconnected.

So make sure that we have a valid server before calling Conf_NickIsService()!

2 years agoEnhance documentation a bit, add doc/QuickStart.md
Alexander Barton [Thu, 30 Dec 2021 19:01:44 +0000 (20:01 +0100)]
Enhance documentation a bit, add doc/QuickStart.md

And this file could well be expanded!

2 years agodoc/HowToRelease.txt: "dist-tarZ" and "dist-xz" make targets can't be combined
Alexander Barton [Sun, 31 Oct 2021 12:41:20 +0000 (13:41 +0100)]
doc/HowToRelease.txt: "dist-tarZ" and "dist-xz" make targets can't be combined

3 years agongIRCd Release 26.1 rel-26.1
Alexander Barton [Sat, 2 Jan 2021 13:32:48 +0000 (14:32 +0100)]
ngIRCd Release 26.1

3 years agoUpdate AUTHORS file
Alexander Barton [Sat, 2 Jan 2021 13:23:45 +0000 (14:23 +0100)]
Update AUTHORS file