]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
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

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

8 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.

9 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

14 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.

15 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.

15 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.

15 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!

15 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.

15 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.

15 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.

15 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.

15 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

15 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

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

15 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.

15 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.

15 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."

15 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)

15 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" ...

15 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()

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

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

17 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

17 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

3 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sat, 2 Jan 2021 12:36:45 +0000 (13:36 +0100)]
Update config.guess and config.sub to recent versions

- config.guess: 2020-12-22
- config.sub: 2020-12-22

3 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Fri, 1 Jan 2021 19:07:47 +0000 (20:07 +0100)]
Update NEWS and ChangeLog files

3 years agoUpdate Platforms.txt
Alexander Barton [Fri, 1 Jan 2021 15:12:46 +0000 (16:12 +0100)]
Update Platforms.txt

- Add aarch64/apple/darwin (Apple CLang 12.0.0)
- Add x86_64/unknown/openbsd6.7 (gcc 4.2.1)

Thanks to Götz Hoffart <goetz@hoffart.de>

3 years ago2021! :-)
Alexander Barton [Fri, 1 Jan 2021 14:38:26 +0000 (15:38 +0100)]
2021! :-)

Happy new year!

3 years agoExplicitely cast Conf_MaxPenaltyTime (time_t) to "long"
Alexander Barton [Tue, 29 Dec 2020 20:45:09 +0000 (21:45 +0100)]
Explicitely cast Conf_MaxPenaltyTime (time_t) to "long"

This fixes the following compiler warning, for example on OpenBSD:

  conf.c: In function 'Conf_Test':
  conf.c:391: warning: format '%ld' expects type 'long int', but argument
                       2 has type 'time_t'

Thanks to Götz Hoffart for reporting this!

3 years agoDon't set AI_ADDRCONFIG, even when it exists
Alexander Barton [Tue, 29 Dec 2020 20:12:43 +0000 (21:12 +0100)]
Don't set AI_ADDRCONFIG, even when it exists

Basically, the issue described in #281 is that the test suite uses the
IPv4 address 127.0.0.1 on an IPv6-only host. But this is the "safest"
thing to do in (almost) all other setups: relaying on DNS host names
makes things even more complex, as different systems map 127.0.0.1
differently (including the reverse lookup; that's why we switched to
127.0.0.1 back in 2014, see commit 3f807e10457).

But with AI_ADDRCONFIG set, on an IPv6-only host, we prevent 127.0.0.1
to get translated properly, even when the loopback interface has this
address configured! So don't set it any more.

The drawback is that the resolver possibly returns more addresses now,
even of an unsupported/not connected address family; but this shouldn't
do much harm in practice, as ngIRCd iterates over all returned addresses
while trying to establish an outgoing connection.

Closes #281.

3 years agoFAQ.txt: There is no "CVS" anymore, we use Git!
Alexander Barton [Sat, 28 Nov 2020 20:21:47 +0000 (21:21 +0100)]
FAQ.txt: There is no "CVS" anymore, we use Git!

3 years agoFix typo in comment: operaor -> operator
Rolf Eike Beer [Sun, 1 Nov 2020 17:00:22 +0000 (18:00 +0100)]
Fix typo in comment: operaor -> operator

3 years agoRevert "Show allowed channel types in ISUPPORT(005) numeric only"
Alexander Barton [Mon, 2 Nov 2020 10:45:41 +0000 (11:45 +0100)]
Revert "Show allowed channel types in ISUPPORT(005) numeric only"

The ISUPPORT(005) numeric lists only channel prefixes which are listed
in the "AllowedChannelTypes" configuration option. And if this is the
empty string ("") for example, this now results in IRC clients assuming
"oh, no channel prefix characters at all, so no channels at all, so no
PRIVMSG can go to any channel" -- which is not the case when there are
pre-defined channel set up or other servers still having channels!

So "allowed channel types" != "supported channel types", and we always
have to list all supported ones in the ISUPPORT(005) numeric!

This reverts commit 4b7e8db418340576c95f1edad8470b66d6fe886d.

Closes #285.

3 years agoTest suite: Wait 2 seconds after reloading the daemon
Alexander Barton [Sun, 1 Nov 2020 16:25:39 +0000 (17:25 +0100)]
Test suite: Wait 2 seconds after reloading the daemon

On reload, all listening ports are closed, configuration updated, and
then opened again. Which leads to subsequent tests running while the
daemon isn't listening on any ports, and that's why the tests fail.

The "proper" way whould be to loop and check for open ports, but waiting
is what the start-server.sh script does right now, so stick with this in
reload-server.sh for now as well.

This fixes the issue, at least on my RaspberryPi ...

Closes #280.

3 years agoUpdate Platforms.txt
Alexander Barton [Tue, 20 Oct 2020 19:48:16 +0000 (21:48 +0200)]
Update Platforms.txt

- Update powerpc/apple/darwin8.11.0 (gcc 4.0.1)
- Add x86_64/apple/darwin19.6.0 (Apple clang 12.0.0)
- Add x86_64/unknown/freebsd12.1 (FreeBSD clang 8.0.1)
- Update x86_64/pc/linux-gnu (gcc 8.3.0)
- Add x86_64/unknown/netbsd9.0 (gcc 7.4.0)
- Add x86_64/unknown/openbsd6.6 (gcc 4.2.1)
- Add x86_64/unknown/openbsd6.6 (OpenBSD clang 8.0.1)

Thanks to Götz Hoffart <goetz@hoffart.de> for the PowerPC test!

3 years agoplatformtest.sh: Try to mangle CLang name more intellligently
Alexander Barton [Tue, 20 Oct 2020 19:47:10 +0000 (21:47 +0200)]
platformtest.sh: Try to mangle CLang name more intellligently

3 years agoFixed Atheme Links
xnaas [Tue, 4 Aug 2020 03:17:04 +0000 (22:17 -0500)]
Fixed Atheme Links

.org and not .net

3 years agongIRCd Release 26 rel-26
Alexander Barton [Sat, 20 Jun 2020 13:54:19 +0000 (15:54 +0200)]
ngIRCd Release 26

3 years agoINSTALL.md: Add instructions for ArchLinux (pacman)
Alexander Barton [Sat, 20 Jun 2020 13:54:02 +0000 (15:54 +0200)]
INSTALL.md: Add instructions for ArchLinux (pacman)

3 years agongIRCd Release 26~rc2 rel-26-rc2
Alexander Barton [Thu, 11 Jun 2020 15:22:08 +0000 (17:22 +0200)]
ngIRCd Release 26~rc2

3 years agoUpdate NEWS, ChangeLog and doc/Platforms.txt files
Alexander Barton [Thu, 11 Jun 2020 15:13:06 +0000 (17:13 +0200)]
Update NEWS, ChangeLog and doc/Platforms.txt files

3 years agoAdd AppStream metadata file: contrib/de.barton.ngircd.metainfo.xml
Alexander Barton [Thu, 11 Jun 2020 15:11:15 +0000 (17:11 +0200)]
Add AppStream metadata file: contrib/de.barton.ngircd.metainfo.xml

3 years agoDon't send invalid CHANINFO commands when no key is set
Alexander Barton [Thu, 11 Jun 2020 14:45:30 +0000 (16:45 +0200)]
Don't send invalid CHANINFO commands when no key is set

It can happen that a channel is +k, but no key is set: for example by
misconfiguring a pre-defined channel. In this case, ngIRCd sent an
invalud CHANINFO command ("CHANINFO #test +Pk  0 :'", note the unset
key represented by the two spaces) to its peers.

Fix this and enhance the CHANINFO documentation.

3 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 31 May 2020 17:38:59 +0000 (19:38 +0200)]
Update NEWS and ChangeLog files

3 years agoUpdate description text in manual page, too!
Alexander Barton [Tue, 26 May 2020 21:00:25 +0000 (23:00 +0200)]
Update description text in manual page, too!

3 years agongircd.spec: Fix name of README.md and INSTALL.md
Alexander Barton [Tue, 26 May 2020 17:55:01 +0000 (19:55 +0200)]
ngircd.spec: Fix name of README.md and INSTALL.md

3 years agoUpdate description texts
Alexander Barton [Tue, 26 May 2020 17:43:11 +0000 (19:43 +0200)]
Update description texts

Bring them in line with the updated texts on the homepage.

3 years agoIRC_SQUIT(): Fix use-after-free when unregistering the sending client
Alexander Barton [Mon, 25 May 2020 22:05:22 +0000 (00:05 +0200)]
IRC_SQUIT(): Fix use-after-free when unregistering the sending client

3 years agoIRC_SERVER: Make sure that the client sent a prefix
Alexander Barton [Mon, 25 May 2020 21:43:29 +0000 (23:43 +0200)]
IRC_SERVER: Make sure that the client sent a prefix

The SERVER command is only valid with a prefix when received from other
servers, so make sure that there is one and disconnect the peer if not
(instead of crashing ...).

This obsoletes PR #275.

Thanks Hilko Bengen (hillu) for finding & reporting this as well for the
patch & pull request! But I think this is the "more correct" fix.

3 years agoEnhance debug logging for PONG commands
Alexander Barton [Mon, 25 May 2020 21:30:07 +0000 (23:30 +0200)]
Enhance debug logging for PONG commands

Distinguish between expected and unexpected PONG commands.

3 years agoFix PING-PONG handling when processing backlog in read buffers
Alexander Barton [Mon, 25 May 2020 17:02:16 +0000 (19:02 +0200)]
Fix PING-PONG handling when processing backlog in read buffers

Prior to this commit, the PONG wasn't registered correctly, becauuse the
"last ping" time was set to time(NULL), which could be bigger than the
"last data" time stamp, for example when handling the read buffer took
more than 1 second -- and this resulted in the PONG time out kicking in
effectively disconnecting a newly linked server for example, because
ngIRCd thought it was still waiting for a PONG: last data < last ping.

Now the "last ping" value has three possible values:

    0: new connection, no PING, no PONG so far.
    1: got a PONG, no longer waiting for a PONG.
  <t>: time stamp of last sent out PING command.

3 years agoRevert "Set the "last data" time to "last ping" time when updating the latter"
Alexander Barton [Sun, 24 May 2020 21:24:51 +0000 (23:24 +0200)]
Revert "Set the "last data" time to "last ping" time when updating the latter"

This patch completely broke the PING-PONG logic: now ngIRCd never
disconnects any stale peers but keeps sending out PINGs over and over
again ...

The real issue (server disconnects right after connect) will be fixed in
the next commit, but let's revert to the somewhat "half-broken but
'known' state" first ...

This reverts commit 79a917f954bef8089967786bd3597a6e5ff5c336.

3 years agotestsuite: Add missing files to EXTRA_DIST
Hilko Bengen [Fri, 22 May 2020 10:29:09 +0000 (12:29 +0200)]
testsuite: Add missing files to EXTRA_DIST

26~rc1 as extracted from tarball cannot be built/tested with SSL
support because of a missing script and certificates.

3 years agongIRCd Release 26~rc1 rel-26-rc1
Alexander Barton [Sun, 10 May 2020 15:13:51 +0000 (17:13 +0200)]
ngIRCd Release 26~rc1

3 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sun, 10 May 2020 15:06:27 +0000 (17:06 +0200)]
Update config.guess and config.sub to recent versions

- config.guess: 2020-04-26
- config.sub: 2020-05-04

And set both scripts +x, they are executable.

3 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sat, 9 May 2020 23:09:34 +0000 (01:09 +0200)]
Update NEWS and ChangeLog files

3 years agoAdd missing authors to AUTHORS, tweak ".mailmap" file
Alexander Barton [Sat, 9 May 2020 22:16:11 +0000 (00:16 +0200)]
Add missing authors to AUTHORS, tweak ".mailmap" file

3 years agoTweak & update doc/HowToRelease.txt a bit ...
Alexander Barton [Sat, 9 May 2020 22:14:04 +0000 (00:14 +0200)]
Tweak & update doc/HowToRelease.txt a bit ...

3 years agoAllow more characters per line in MOTD and help text files
Alexander Barton [Thu, 7 May 2020 16:10:41 +0000 (18:10 +0200)]
Allow more characters per line in MOTD and help text files

Change the line buffer in the Read_TextFile() function from 127 to
COMMAND_LEN (=512) bytes. Lines can't even get that long, because they
have to be prefixed before being sent to the client, so this is a sane
maximum.

This allows for even more "fancy" and "wider" MOTDs :-)

Closes #271.

3 years agoShow allowed channel types in ISUPPORT(005) numeric only
Alexander Barton [Thu, 7 May 2020 16:03:06 +0000 (18:03 +0200)]
Show allowed channel types in ISUPPORT(005) numeric only

Don't show the static list of all possibly available channel types ...

Closes #273.

3 years agoPlatforms.txt: Add x86_64/apple/darwin19.0.0
Alexander Barton [Mon, 16 Dec 2019 16:06:51 +0000 (17:06 +0100)]
Platforms.txt: Add x86_64/apple/darwin19.0.0

- Add x86_64/apple/darwin19.0.0 (Apple clang 11.0)

3 years agoUpdate Platforms.txt
Alexander Barton [Mon, 16 Dec 2019 16:05:39 +0000 (17:05 +0100)]
Update Platforms.txt

- Update powerpc/apple/darwin8.11.0 (gcc 4.0.1)
- Add mips/sgi/irix6.5 (SGI C compiler)
- Add mipsel/unknown/netbsd8.0 (gcc 5.5.0)

Thanks to Götz Hoffart <goetz@hoffart.de>!

3 years agoSSL test server: Use port 6790, like "test server #2"
Alexander Barton [Wed, 6 May 2020 21:55:23 +0000 (23:55 +0200)]
SSL test server: Use port 6790, like "test server #2"

Don't use the "standard" IRC SSL port 6697, as this easily collides with
real (ng)IRCd instances running on the same machine.

And by reusing port 6790, which is already used by the "test server #2",
we don't need any other port than the test suite already uses.

3 years agoGit: Ignore generated files of SSL tests
Alexander Barton [Thu, 30 Apr 2020 10:15:54 +0000 (12:15 +0200)]
Git: Ignore generated files of SSL tests

3 years agoMerge pull request #269 from hillu/gnutls-reload-cert
Alexander Barton [Wed, 6 May 2020 21:36:19 +0000 (23:36 +0200)]
Merge pull request #269 from hillu/gnutls-reload-cert

Add support for GnuTLS certificate reload.

Thanks a lot, Hilko Bengen!

3 years agoUpdate Client_SetHostname() to not use strpbrk()
Alexander Barton [Sun, 3 May 2020 22:55:25 +0000 (00:55 +0200)]
Update Client_SetHostname() to not use strpbrk()

Not sure about the portability of strpbrk() in really ancient OS, and
this was the only place where it became used recently in ngIRCd ...
So let's play it safe! ;-)

3 years agoAllow hostmask cloaking when rDNS is disabled
michi [Tue, 21 Apr 2020 11:02:08 +0000 (13:02 +0200)]
Allow hostmask cloaking when rDNS is disabled

3 years agoDon't wait for the network when read buffers possibly hold commands
Alexander Barton [Sun, 3 May 2020 00:55:34 +0000 (02:55 +0200)]
Don't wait for the network when read buffers possibly hold commands

There is no point in waiting up to one second for the network receiving
new data when there is still a read buffer holding at least one command;
we shouldn't waste time but handle it immediately!

3 years agoHandle commands in the read buffer before reading more data
Alexander Barton [Fri, 1 May 2020 21:55:28 +0000 (23:55 +0200)]
Handle commands in the read buffer before reading more data

If there are more bytes in the read buffer already than a single valid
IRC command can get long (513 bytes, COMMAND_LEN), wait for this/those
command(s) to be handled first and don't try to read even more data from
the network (which most probably would overflow the read buffer of this
connection soon).

3 years agoRead_Request(): Clean up code and add some more comments
Alexander Barton [Fri, 1 May 2020 21:41:49 +0000 (23:41 +0200)]
Read_Request(): Clean up code and add some more comments

No functional changes.

3 years agoRevert "Increase read buffer size for server connections"
Alexander Barton [Fri, 1 May 2020 20:38:41 +0000 (22:38 +0200)]
Revert "Increase read buffer size for server connections"

This reverts commit c6e3c13f27744971fcb1d2de4e561d3bcdaa5aed.

This sounded like the right approach at first, but I'm not that sure
that it really makes sense to have different sizes of read buffers: the
per-connection read buffer only needs to keep data that is needed to
parse one full command, be it plain text, encrypted and/or compressed.
Then ngIRCd should handle this one command, move leftover data to the
beginning of the buffer and read the next chunk from the network that is
missing to get the next complete command (512 bytes at max).

So I revert this for now and try to fix the logic in Read_Request(),
which is broken nevertheless, as it results in servers becoming
disconnected during "server burst" when "big" lists are transferred.

3 years agoCorrectly use Config_Error() instead of Log() in Read_Config()
Alexander Barton [Sun, 3 May 2020 15:08:51 +0000 (17:08 +0200)]
Correctly use Config_Error() instead of Log() in Read_Config()

The name of the Config_Error() function is misleading: it is not only
used to show configuraton errors, but all messages shown during normal
operation as well as for "config testing": it takes care of the correct
formatting of the messages (syslog, forground logging, config testing).

This fixes commit bb1d014abad8.

3 years agocontrib/nglog.sh: Looks like GNU awk (gawk) is needed ...
Alexander Barton [Sun, 3 May 2020 15:07:51 +0000 (17:07 +0200)]
contrib/nglog.sh: Looks like GNU awk (gawk) is needed ...

3 years agoUpdate Travis-CI configuration, "sudo" is depreacted
Alexander Barton [Sun, 3 May 2020 01:11:25 +0000 (03:11 +0200)]
Update Travis-CI configuration, "sudo" is depreacted

3 years agoLog G-/K-Line changes only when not initiated by a server
Alexander Barton [Sun, 3 May 2020 01:08:41 +0000 (03:08 +0200)]
Log G-/K-Line changes only when not initiated by a server

This prevents the log from becomming spammed during "net bursts".

3 years agoSet the "last data" time to "last ping" time when updating the latter
Alexander Barton [Sun, 3 May 2020 01:04:29 +0000 (03:04 +0200)]
Set the "last data" time to "last ping" time when updating the latter

This is required because the PING can be received quite a bit earlier
than it is actually handled, for example during "server burst" or other
heavy operations:
So the times won't match and PING-PONG logic would become garbled,
because we test for "last ping > last data" to determine if a PING
already was sent or not.

3 years agoupdating testsuite to support ssl-tests
Johann Hartwig Hauschild [Fri, 24 Apr 2020 22:04:38 +0000 (00:04 +0200)]
updating testsuite to support ssl-tests

3 years agoINSTALL.md: Add not about removed legacy options
Alexander Barton [Mon, 20 Apr 2020 17:31:57 +0000 (19:31 +0200)]
INSTALL.md: Add not about removed legacy options

3 years agoMakefile.am: Replace make with ${MAKE} (#270)
sam_c [Mon, 20 Apr 2020 17:29:16 +0000 (18:29 +0100)]
Makefile.am: Replace make with ${MAKE} (#270)

Fixes warnings such as:
"warning: jobserver unavailable: using -j1. Add `+' to parent make rule."

Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
3 years agoUpdate AUTHORS file
Alexander Barton [Mon, 20 Apr 2020 17:25:28 +0000 (19:25 +0200)]
Update AUTHORS file

3 years agoChangeLog: Add missing patch attribution
Alexander Barton [Mon, 20 Apr 2020 17:25:02 +0000 (19:25 +0200)]
ChangeLog: Add missing patch attribution