ngircd-alex.git
6 weeks agoFixed Atheme Links master
xnaas [Tue, 4 Aug 2020 03:17:04 +0000 (22:17 -0500)]
Fixed Atheme Links

.org and not .net

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

2 months 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 months 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 months 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 months 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 months 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 months agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 31 May 2020 17:38:59 +0000 (19:38 +0200)]
Update NEWS and ChangeLog files

3 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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.

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

4 months 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.

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

4 months 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

4 months 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 ...

4 months 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.

4 months 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.

4 months 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)

4 months 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>!

4 months 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.

4 months 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

4 months 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!

4 months 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! ;-)

4 months 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

4 months 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!

4 months 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).

4 months 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.

4 months 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.

4 months 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.

4 months 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 ...

4 months 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

4 months 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".

4 months 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.

4 months 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

4 months 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

4 months 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>
4 months agoUpdate AUTHORS file
Alexander Barton [Mon, 20 Apr 2020 17:25:28 +0000 (19:25 +0200)]
Update AUTHORS file

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

4 months agoUpdate NEWS and ChangeLog files
Alexander Barton [Mon, 20 Apr 2020 17:14:54 +0000 (19:14 +0200)]
Update NEWS and ChangeLog files

4 months agocontrib/nglog.sh: Use bash(1) as interpreter
Alexander Barton [Mon, 20 Apr 2020 08:01:01 +0000 (10:01 +0200)]
contrib/nglog.sh: Use bash(1) as interpreter

bash(1) is required to handle the forking and output redirection
connectly, sh(1) -- at least dash(1) on Debian -- fails ...

This fixes the last commit, 14777c18c.

4 months agocontrib/nglog.sh: Fork awk(1), deal better with signals (CTRL-C)
Alexander Barton [Sun, 19 Apr 2020 22:55:24 +0000 (00:55 +0200)]
contrib/nglog.sh: Fork awk(1), deal better with signals (CTRL-C)

4 months agoUpdate Xcode project for latest Xcode version (11.4.1)
Alexander Barton [Sun, 19 Apr 2020 22:54:06 +0000 (00:54 +0200)]
Update Xcode project for latest Xcode version (11.4.1)

4 months agoRemove legacy configuration options
michi [Thu, 16 Apr 2020 09:25:44 +0000 (11:25 +0200)]
Remove legacy configuration options

Remove legacy configuration options and related functions that have
been marked for removal for some time:

- PredefChannelsOnly (v22)
- NoticeAuth (v24)
- NoXXX (v19)
- Old '[GLOBAL]' section handling (v19)

4 months agoIncrease read buffer size for server connections
michi [Wed, 15 Apr 2020 08:32:08 +0000 (10:32 +0200)]
Increase read buffer size for server connections

This applies the same logic we have for write buffers to distinguish
between server and client connections and sets the maximum buffer size
accordingly. As a result peering with servers with many GLINE/KLINEs
does not kill the connecting server connection anymore.

4 months agoFix recursion bug on write error
michi [Tue, 14 Apr 2020 15:41:52 +0000 (17:41 +0200)]
Fix recursion bug on write error

Depending on the stack size, too many clients on the same channel
quitting at the same time would trigger a crash due to too many
recursive calls to Conn_Close().

4 months agoFix hostmask cloaking bug for IPv6 too
michi [Tue, 14 Apr 2020 14:58:04 +0000 (16:58 +0200)]
Fix hostmask cloaking bug for IPv6 too

4 months agoUnbreak GCC 10 (-fno-common) build
michi [Tue, 14 Apr 2020 14:53:02 +0000 (16:53 +0200)]
Unbreak GCC 10 (-fno-common) build

4 months agoGnuTLS: Eliminate memory leaks for DH parameters, priorities cache
Hilko Bengen [Sun, 19 Apr 2020 19:20:43 +0000 (21:20 +0200)]
GnuTLS: Eliminate memory leaks for DH parameters, priorities cache

The DH parameters reference has to be stored next to the x509_cred
which holds a reference to it.

5 months agoAdd support for GnuTLS certificate reload
Hilko Bengen [Fri, 17 Apr 2020 15:34:12 +0000 (17:34 +0200)]
Add support for GnuTLS certificate reload

This requires keeping track of currently active certificates, so those
are stored separately, along with a reference counter, and discarded
when they are no longer in use.

5 months agoUpdate documentation to reflect "[Channel]->Modes" changes
Alexander Barton [Sun, 29 Mar 2020 21:17:21 +0000 (23:17 +0200)]
Update documentation to reflect "[Channel]->Modes" changes

No longer mention "[Channel]->Key" and "[Channel]->MaxUsers".

5 months agoConvert INSTALL and README files to Markdown
Alexander Barton [Tue, 11 Feb 2020 20:00:18 +0000 (21:00 +0100)]
Convert INSTALL and README files to Markdown

This requires some changes to the build system, for example to comply
with the expectations of the GNU autoconf/automake tools ...

5 months agoAdd deprecation warnings for "Key" and "MaxUsers" in [Channel]
Alexander Barton [Sun, 29 Mar 2020 20:30:47 +0000 (22:30 +0200)]
Add deprecation warnings for "Key" and "MaxUsers" in [Channel]

5 months agoTest suite: Test multiple "Modes" lines in [Channel] sections
Alexander Barton [Sun, 29 Mar 2020 00:15:39 +0000 (01:15 +0100)]
Test suite: Test multiple "Modes" lines in [Channel] sections

5 months agoPredefined channles: Fix handling of legacy configuration options
Alexander Barton [Sat, 28 Mar 2020 22:37:47 +0000 (23:37 +0100)]
Predefined channles: Fix handling of legacy configuration options

Fix the handling of legacy "Key" and "MaxUsers" [Channel] settings:

- Activate them before evaluating the "Modes" parameter, to allow the
  latter to override those legacy options.
- Enforce setting the respective +k/+l mode(s) to support the legacy
  "Mode = kl" notation, which was valid but is an invalid MODE string:
  key and limit are missing! So set them manually when "k" or "l" are
  detected in the first MODE parameter.
- Sort modes +kl alphabetically, adjust test suite accordingly.

5 months agoEnhance logging while setting up predefined channels
Alexander Barton [Sat, 28 Mar 2020 22:33:03 +0000 (23:33 +0100)]
Enhance logging while setting up predefined channels

5 months agoAllow multiple "Modes =" lines per [Channel] section
michi [Sat, 29 Feb 2020 16:32:52 +0000 (16:32 +0000)]
Allow multiple "Modes =" lines per [Channel] section

5 months agoEvaluate initial channel modes
michi [Wed, 19 Feb 2020 09:26:21 +0000 (09:26 +0000)]
Evaluate initial channel modes

Allow setting arbitrary channel modes in the config file.

Closes #55.

5 months agoXcode: add missing files in src/testsuite, and sort them
Alexander Barton [Sat, 28 Mar 2020 22:46:16 +0000 (23:46 +0100)]
Xcode: add missing files in src/testsuite, and sort them

5 months agoAdd "FNC" (forced nick changes) to ISUPPORT(005) numeric
Alexander Barton [Sun, 22 Mar 2020 13:07:32 +0000 (14:07 +0100)]
Add "FNC" (forced nick changes) to ISUPPORT(005) numeric

Most probably this doesn't make any difference to any client, but it
seems correct. See <http://www.irc.org/tech_docs/005.html> for details.

7 months agoFix memory leak in portabtest Check_strtok_r()
Alexander Barton [Sat, 15 Feb 2020 13:56:07 +0000 (14:56 +0100)]
Fix memory leak in portabtest Check_strtok_r()

Fix the following Clang "LeakSanitizer" error (which isn't quite
relevant in this test program, but anyway):

  ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 7 byte(s) in 1 object(s) allocated from:
      #0 0x7f8c4d022810 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
      #1 0x5601a801491a in Check_strtok_r (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x291a)
      #2 0x5601a8014d77 in main (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x2d77)
      #3 0x7f8c4c69009a in __libc_start_main ../csu/libc-start.c:308

  SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
  FAIL: portabtest

7 months agoReuse old SSL key if loading a new one failed
michi [Fri, 14 Feb 2020 12:44:10 +0000 (12:44 +0000)]
Reuse old SSL key if loading a new one failed

7 months agoUpdate Xcode project for latest Xcode version (11.3.1)
Alexander Barton [Tue, 11 Feb 2020 19:33:44 +0000 (20:33 +0100)]
Update Xcode project for latest Xcode version (11.3.1)

7 months agoRemove outdated OpenBSD/NetBSD systrace.policy
Alexander Barton [Tue, 11 Feb 2020 19:20:45 +0000 (20:20 +0100)]
Remove outdated OpenBSD/NetBSD systrace.policy

Systrace was removed from OpenBSD and NetBSD, so remove this (old and
outdated?) configuration file from the ./contrib directory.

See <https://en.wikipedia.org/wiki/Systrace>.

Thanks to "michi" for pointing this out on #ngircd!

7 months ago2020!
Alexander Barton [Tue, 21 Jan 2020 21:02:40 +0000 (22:02 +0100)]
2020!

8 months agoEnhance handling of command line errors, and "--help" & "--version"
Alexander Barton [Tue, 31 Dec 2019 15:34:23 +0000 (16:34 +0100)]
Enhance handling of command line errors, and "--help" & "--version"

Return with exit code 0 ("no error") when "--help" or "--version" was
used (this resulted in exit code 1, "error" before).

And exit with code 2 ("command line error") for all invalid command
line options, and show the error message on stderr (message was printed
to stdout before, and exit code was 1, "generic error").

This new behaviour is more in line with the GNU "coding standards",
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.

9 months agoFix and update Xcode project
Alexander Barton [Mon, 16 Dec 2019 15:57:56 +0000 (16:57 +0100)]
Fix and update Xcode project

- Reference correct contrib/Makefile.am file
- Correctly sort contrib/nglog.sh
- Add "ORGANIZATIONNAME" setting

9 months agoUpdate ngindent.sh name in Makefile and Xcode project, too
Alexander Barton [Mon, 16 Dec 2019 15:54:13 +0000 (16:54 +0100)]
Update ngindent.sh name in Makefile and Xcode project, too

9 months agocontrib/README: Add nglog.sh script to the list
Alexander Barton [Sat, 7 Dec 2019 00:43:00 +0000 (01:43 +0100)]
contrib/README: Add nglog.sh script to the list

9 months agocontrib/nglog.sh: Use bright colors for warning & error messages
Alexander Barton [Sat, 7 Dec 2019 00:42:33 +0000 (01:42 +0100)]
contrib/nglog.sh: Use bright colors for warning & error messages

9 months agocontrib/ngindent.sh: Enhance and rename script
Alexander Barton [Sat, 7 Dec 2019 00:41:39 +0000 (01:41 +0100)]
contrib/ngindent.sh: Enhance and rename script

Add more GNU indent options for better results, and add the ".sh" suffix
to bring this script in line with the others in the contrib/ folder.

9 months agoUpdate install documentation: libgnutls-dev
Windree [Sun, 1 Dec 2019 23:45:09 +0000 (02:45 +0300)]
Update install documentation: libgnutls-dev

According https://packages.debian.org/search?keywords=libgnutls28-dev
in Ubuntu and Debian libgnutls-dev package name is libgnutls28-dev

Closes #264.

Thanks Windree!

10 months agoAdd simple log colorization script: ./contrib/nglog.sh
Alexander Barton [Sun, 10 Nov 2019 21:07:26 +0000 (22:07 +0100)]
Add simple log colorization script: ./contrib/nglog.sh

This script parses the log output of ngircd(8), and colorizes the
messages accoring to their log level. Example usage:

ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh

10 months agoLog received signals (using strsignal(3), when available)
Alexander Barton [Sun, 10 Nov 2019 20:12:39 +0000 (21:12 +0100)]
Log received signals (using strsignal(3), when available)

10 months agoMake test suite compatible with Haiku
Alexander Barton [Sun, 3 Nov 2019 14:15:59 +0000 (15:15 +0100)]
Make test suite compatible with Haiku

10 months agoAdd VIM "swap files" (*.swp) to .gitignore file
Alexander Barton [Sun, 3 Nov 2019 14:01:51 +0000 (15:01 +0100)]
Add VIM "swap files" (*.swp) to .gitignore file

12 months agoFix hostmask cloaking bug, don't cloak multiple times
JRMU [Wed, 4 Sep 2019 04:48:54 +0000 (06:48 +0200)]
Fix hostmask cloaking bug, don't cloak multiple times

Previously, each server would cloak every user's hostmask. The problem
is that if a network has more than one server, then a user's hostmask
would get cloaked twice. This patch ensures that a server only cloaks
the hostmask if it has not yet been cloaked (the period indicates it's
still an IP address).

Closes #228.

13 months agoFix some typos (documentation files, ngircd.conf manual page, ...)
Alexander Barton [Sun, 21 Jul 2019 14:23:07 +0000 (16:23 +0200)]
Fix some typos (documentation files, ngircd.conf manual page, ...)

Spotted by Étienne Mollier <etienne.mollier@mailoo.org> and Christoph
Biedl <debian.axhn@manchmal.in-ulm.de>, see Debian bug #932462
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932462). Thank you!

14 months agoMake sure HAVE_LIBSSL is defined, even when using pkg-config
Alexander Barton [Mon, 1 Jul 2019 19:56:36 +0000 (21:56 +0200)]
Make sure HAVE_LIBSSL is defined, even when using pkg-config

Without this, the configure script assumes and states that OpenSSL will
be used, but the code won't include support for it because there we use
the "HAVE_LIBSSL" define to test for it ("#ifdef HAVE_LIBSSL").

So define the latter when pkg-config(1) is used, too.

This fixes #257, a regression introduced by commit ad86a41ee :-/

14 months agoEnlage buffers of info texts to 128 bytes.
Alexander Barton [Sat, 29 Jun 2019 14:07:29 +0000 (16:07 +0200)]
Enlage buffers of info texts to 128 bytes.

This includes:
- "Real name" of a client (4th filed of the USER command).
- Server info text ("Info" configuration option).
- Admin info texts and email address ("AdminInfo1", "AdminInfo2" and
  "AdminEmail" configuration options).
- Network name ("Network" configuration option).

The limit was 64 bytes before ...

Closes #258.

14 months agoAdd ".vscode" to .gitignore file
Alexander Barton [Sat, 29 Jun 2019 14:04:59 +0000 (16:04 +0200)]
Add ".vscode" to .gitignore file

14 months agoStreamline handling of invalid and unset server name
Alexander Barton [Sat, 29 Jun 2019 14:02:52 +0000 (16:02 +0200)]
Streamline handling of invalid and unset server name

Don't exit during runtime (REHASH command, HUP signal), because the
server name can't be changed in this case anyway and the new invalid
name will be ignored.

14 months agoFix and extend documentation a little bit
Alexander Barton [Sat, 29 Jun 2019 14:02:18 +0000 (16:02 +0200)]
Fix and extend documentation a little bit

- Fix syntax of LINKS amd LIST commands.
- Whitespace and spelling fixes.
- Add some more information about IRCv3 support.

14 months agoSlightly reoder startup steps, and enhance logging
Alexander Barton [Sat, 29 Jun 2019 13:57:44 +0000 (15:57 +0200)]
Slightly reoder startup steps, and enhance logging

- Show name of configuration file at the beginning of start up.
- Add a message when ngIRCd is ready, including its host name.
- Show name of configuration file on REHASH (SIGHUP), too.
- Change level of "done message" to NOTICE, like "starting" & "ready".
- Initialize IO functions before channels, connections, clients, ...

16 months agoUpdate autogen.sh & INSTALL for pkg-config requirements
Alexander Barton [Sat, 20 Apr 2019 16:51:39 +0000 (18:51 +0200)]
Update autogen.sh & INSTALL for pkg-config requirements

16 months agoconfigure.ng: use pkg-config to find PpenSSL dependencies
Fabrice Fontaine [Thu, 11 Apr 2019 21:24:36 +0000 (23:24 +0200)]
configure.ng: use pkg-config to find PpenSSL dependencies

OpenSSL can depends on lz or latomic so use pkg-config to find those
dependencies and fallback to existing mechanism.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Closes #256.

19 months agongircd.conf.5: Fix wording as suggested by lintian
Christoph Biedl [Mon, 28 Jan 2019 09:45:53 +0000 (10:45 +0100)]
ngircd.conf.5: Fix wording as suggested by lintian

19 months agongIRCd Release 25 rel-25
Alexander Barton [Wed, 23 Jan 2019 22:15:02 +0000 (23:15 +0100)]
ngIRCd Release 25

19 months agoPlatforms.txt: Add and update systems
Alexander Barton [Wed, 23 Jan 2019 21:45:07 +0000 (22:45 +0100)]
Platforms.txt: Add and update systems

- Update x86_64/apple/darwin16.5.0 (Apple clang 8.1)
- Add x86_64/apple/darwin17.7.0 (Apple clang 10.0)
- Add x86_64/apple/darwin18.2.0 (Apple clang 10.0)
- Add x86_64/unknown/haiku (gcc 7.3)
- Update x86_64/pc/linux-gnu (gcc 6.3.0)

20 months agoFix documentation of MotdPhrase length (#254)
shankari [Thu, 3 Jan 2019 12:44:28 +0000 (04:44 -0800)]
Fix documentation of MotdPhrase length (#254)

The max length is actually 126 (< 127), since the check errors out if
length >= 127. See
<https://github.com/ngircd/ngircd/blob/master/src/ngircd/conf.c#L1487>.

I didn't look through the history to see when the change happened. I
just happened to find during a migration that my 140 character MOTD
didn't work.

Update sample configuration file as well as the man page.

20 months ago2019!
Alexander Barton [Tue, 1 Jan 2019 23:10:06 +0000 (00:10 +0100)]
2019!

21 months agoImplement new configuration option "MaxPenaltyTime" (#251)
Alexander Barton [Wed, 28 Nov 2018 13:13:09 +0000 (14:13 +0100)]
Implement new configuration option "MaxPenaltyTime" (#251)

This option configures the maximum penalty time increase in seconds, per
penalty event. Set to -1 for no limit (the default), 0 to disable
penalties altogether. ngIRCd doesn't use penalty increases higher than 2
seconds during normal operation, so values higher than 1 rarely make
sense.

Disabling (or reducing) penalties can greatly speed up "make check" runs
for example, see below, but are mostly a debugging feature and normally
not meant to be used on production systems!

Some example timings running "make check" from my macOS workstation:

- MaxPenaltyTime not set: 4:41,79s
- "MaxPenaltyTime = 1":   3:14,71s
- "MaxPenaltyTime = 0":     25,46s

Closes #249.

21 months agoFix compilation without deprecated OpenSSL APIs (#252)
Rosen Penev [Wed, 28 Nov 2018 13:10:46 +0000 (05:10 -0800)]
Fix compilation without deprecated OpenSSL APIs (#252)

22 months agoUpdate Xcode project for latest Xcode version (10.0)
Alexander Barton [Tue, 30 Oct 2018 00:56:13 +0000 (01:56 +0100)]
Update Xcode project for latest Xcode version (10.0)