ngircd-alex.git
18 months agoOnly send TOPIC updates to a channel when the topic actually changed
Alexander Barton [Sun, 11 Mar 2018 19:57:19 +0000 (20:57 +0100)]
Only send TOPIC updates to a channel when the topic actually changed

This prevents the channel from becoming flooded by unecessary TOPIC
update messages, that can happen when IRC services try to enforce a
certain topic but which is already set (at least on the local server),
for example. Therefore still forward it to all servers, but don't inform
local clients (still update setter and timestamp information, though!)

18 months agoUpdate Xcode project for latest Xcode version (9.2)
Alexander Barton [Sun, 11 Mar 2018 19:55:03 +0000 (20:55 +0100)]
Update Xcode project for latest Xcode version (9.2)

This includes adding missing and deleting obsolete file references.

18 months agoUse .mailmap to fix spelling of Götz Hoffart
Alexander Barton [Sun, 25 Feb 2018 20:44:14 +0000 (21:44 +0100)]
Use .mailmap to fix spelling of Götz Hoffart

18 months agoLittle code cleanups, better comments
Alexander Barton [Sun, 25 Feb 2018 20:43:39 +0000 (21:43 +0100)]
Little code cleanups, better comments

18 months agoUser mode "C": Allow messages from servers, services, and IRC Ops RelaxUserModeC
Alexander Barton [Fri, 27 Mar 2015 23:05:39 +0000 (00:05 +0100)]
User mode "C": Allow messages from servers, services, and IRC Ops

Update user mode "C" handling ("Only users that share a channel are
allowed to send messages") to behave like user mode "b" ("block private
messages and notices") and therefore allow messages from servers, services,
and IRC Operators, too.

Change proposed by "wowaname" in #ngircd, thanks!

18 months agoportab/Makefile: Split list into separate lines
Alexander Barton [Sun, 29 Jan 2017 20:55:50 +0000 (21:55 +0100)]
portab/Makefile: Split list into separate lines

18 months agoconfigure.ng: Split list into separate lines
Alexander Barton [Sun, 29 Jan 2017 20:42:11 +0000 (21:42 +0100)]
configure.ng: Split list into separate lines

19 months agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 11 Feb 2018 09:22:41 +0000 (10:22 +0100)]
Update NEWS and ChangeLog files

19 months ago2018!
Alexander Barton [Fri, 9 Feb 2018 21:02:21 +0000 (22:02 +0100)]
2018!

19 months agoFix compiler warning in ForwardLookup()
Alexander Barton [Mon, 29 Jan 2018 22:34:40 +0000 (23:34 +0100)]
Fix compiler warning in ForwardLookup()

When compiling without "working getaddrinfo()", the "af" parameter of
ForwardLookup() is unused by that function. Mark it as such!

This prevents the following compiler warning:

  resolve.c:235:56: warning: unused parameter ‘af’
    [-Wunused-parameter]

19 months agoFix compiler warning in Option_String()
Alexander Barton [Mon, 29 Jan 2018 22:32:06 +0000 (23:32 +0100)]
Fix compiler warning in Option_String()

When compiling ngIRCd without support for SSL and without support for
ZLIB, gcc outputs the following warning:

  irc.c:493:9: warning: variable ‘options’ set but not used
    [-Wunused-but-set-variable]

Fix it by providing a dummy function in this case.

19 months agoFix Get_Error() usage, take II
Alexander Barton [Mon, 29 Jan 2018 22:30:53 +0000 (23:30 +0100)]
Fix Get_Error() usage, take II

This should fix the following compiler warning:

  resolve.c:113:1: warning: ‘Get_Error’ defined but not used
    [-Wunused-function]

Which can happen, because the logic of commit 543f44bf isn't sufficient:
Get_Error() is only used when neither HAVE_WORKING_GETADDRINFO nor
HAVE_GETNAMEINFO are set ...

Enhances 543f44bf.
Closes #241.

20 months agocontrib/ngircd.logcheck: Add sample logcheck(8) rules
Alexander Barton [Thu, 28 Dec 2017 17:03:12 +0000 (18:03 +0100)]
contrib/ngircd.logcheck: Add sample logcheck(8) rules

23 months agoAllow IRC Ops and remote servers to KILL service clients (#242)
Alexander Barton [Sat, 30 Sep 2017 14:48:28 +0000 (16:48 +0200)]
Allow IRC Ops and remote servers to KILL service clients (#242)

In the end, service clients behave like regular users, therefore IRC
operators and servers should be able to KILL them: for example to
resolve nick collisions.

This is related to #238.

23 months agoDon't forward KILLs to other servers if they've been blocked locally
James Lu [Tue, 26 Sep 2017 20:50:20 +0000 (13:50 -0700)]
Don't forward KILLs to other servers if they've been blocked locally

This prevents clients from killing IRC services, for example.

Closes #238.
Closes #239.

23 months agoUpdate AUTHORS file
Alexander Barton [Sat, 23 Sep 2017 11:54:39 +0000 (13:54 +0200)]
Update AUTHORS file

2 years agoMerge pull request #240 from bkuhls/fix_Get_Error
Alexander Barton [Sun, 17 Sep 2017 21:27:48 +0000 (23:27 +0200)]
Merge pull request #240 from bkuhls/fix_Get_Error

Fix Get_Error usage

2 years agoFix Get_error usage
Bernd Kuhls [Wed, 13 Sep 2017 12:07:11 +0000 (14:07 +0200)]
Fix Get_error usage

The usage of Get_Error is guarded by "ifdef h_errno" in this file, the
definition of this function should follow the same rules.

Fixes a build error when cross-compiling:
https://github.com/ngircd/ngircd/issues/223

2 years agoUpdate HowToRelease.txt
Alexander Barton [Sun, 12 Mar 2017 21:25:08 +0000 (22:25 +0100)]
Update HowToRelease.txt

- Freshmeat is no more, and
- GitHub issues doesn't allow us to configure "releases".

2 years agoServices.txt: Show Atheme "name" in example configuration
Alexander Barton [Mon, 20 Feb 2017 22:29:40 +0000 (23:29 +0100)]
Services.txt: Show Atheme "name" in example configuration

2 years agoServices.txt: Show ngIRCd "Name" in example configuration
Alexander Barton [Mon, 20 Feb 2017 22:06:47 +0000 (23:06 +0100)]
Services.txt: Show ngIRCd "Name" in example configuration

2 years agongIRCd Release 24 rel-24
Alexander Barton [Fri, 20 Jan 2017 18:13:49 +0000 (19:13 +0100)]
ngIRCd Release 24

2 years agoPlatforms.txt: Add and update systems
Alexander Barton [Fri, 20 Jan 2017 18:12:05 +0000 (19:12 +0100)]
Platforms.txt: Add and update systems

- Update i386/unknown/freebsd7.3 (gcc 4.2.1)
- Update i386/unknown/netbsdelf4.0 (gcc 4.1.2)
- Update x86_64/apple/darwin16.3.0 (Apple clang 8.0)
- Update x86_64/unknown/freebsd8.4 (gcc 4.2.1)
- Update x86_64/pc/linux-gnu (gcc 4.4.5)
- Update x86_64/pc/linux-gnu (gcc 4.8.4)
- Update x86_64/pc/linux-gnu (gcc 4.9.2)
- Update x86_64/pc/linux-gnu (gcc 6.2.1)
- Add x86_64/pc/linux-gnu (gcc 6.3.1)

2 years agoMake sure that platformtest.sh aborts when autogen.sh fails
Alexander Barton [Fri, 20 Jan 2017 16:24:22 +0000 (17:24 +0100)]
Make sure that platformtest.sh aborts when autogen.sh fails

2 years agoSpecify Debian "source format"
Alexander Barton [Fri, 20 Jan 2017 15:08:46 +0000 (16:08 +0100)]
Specify Debian "source format"

2 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Fri, 20 Jan 2017 15:05:46 +0000 (16:05 +0100)]
Update config.guess and config.sub to recent versions

- config.guess: 2016-10-02
- config.sub: 2016-11-04

2 years agoBuild Debian packages with OpenSSL instead of GnuTLS
Alexander Barton [Fri, 20 Jan 2017 15:04:53 +0000 (16:04 +0100)]
Build Debian packages with OpenSSL instead of GnuTLS

OpenSSL allows to reload used certificates on runtime for example (which
is very useful when using Let's Encrypt), and therefore is preferred ...

2 years agoFix handling of connection pool allocation and enlargement
Alexander Barton [Wed, 18 Jan 2017 23:06:46 +0000 (00:06 +0100)]
Fix handling of connection pool allocation and enlargement

The daemon only enlarged its connection pool when accepting new client
connections, not when establishing new outgoing server links.

Thanks to Lukas Braun (k00mi) for reporting this!

In addition this patch streamlines the connection pool allocation, so
that there is only one place in the code allocating the pool: the now
updated Socket2Index() function. The name doesn't quite fit, but this
existing and today quite useless function (because the mapping from
socket number to connection index is 1:1 today) already became called
in almost all relevant code paths, so I decided to reuse it to keep the
patch small ...probably we want to fix the naming in a second patch?

Closes #231.

2 years ago2017!
Alexander Barton [Sun, 15 Jan 2017 21:07:11 +0000 (22:07 +0100)]
2017!

2 years agoUpdate doc/RFC.txt, add RFC 7194
Alexander Barton [Sun, 15 Jan 2017 20:25:07 +0000 (21:25 +0100)]
Update doc/RFC.txt, add RFC 7194

2 years agongIRCd Release 24~rc1 rel-24-rc1
Alexander Barton [Sat, 7 Jan 2017 18:12:06 +0000 (19:12 +0100)]
ngIRCd Release 24~rc1

2 years agoDebian: Use "dh_prep" instead deprecated "dh_clean -k"
Alexander Barton [Sat, 7 Jan 2017 18:45:30 +0000 (19:45 +0100)]
Debian: Use "dh_prep" instead deprecated "dh_clean -k"

2 years agongircd.conf.5.tmpl: Fix spelling
Alexander Barton [Sat, 7 Jan 2017 14:50:58 +0000 (15:50 +0100)]
ngircd.conf.5.tmpl: Fix spelling

Thanks to Christoph Biedl.

2 years agoPlatforms.txt: Add and update systems
Alexander Barton [Fri, 6 Jan 2017 21:51:46 +0000 (22:51 +0100)]
Platforms.txt: Add and update systems

- Add x86_64/apple/darwin16.3.0 (Apple clang 8.0)
- Update x86_64/pc/linux-gnu (gcc 4.9.2)
- Add x86_64/pc/linux-gnu (gcc 6.2.1.)

2 years agoFurther enhance systemd unit file
Alexander Barton [Fri, 6 Jan 2017 21:50:24 +0000 (22:50 +0100)]
Further enhance systemd unit file

- Add more comments/documentation.
- Add dependencies for services and proxy scanners.
- Add more limit configurations.
- Allow AF_UNIX address family, required for syslog!

2 years agoInstall systemd service file in Debian package
Alexander Barton [Thu, 5 Jan 2017 23:38:05 +0000 (00:38 +0100)]
Install systemd service file in Debian package

2 years agoEnhance systemd service file
Alexander Barton [Thu, 5 Jan 2017 23:34:51 +0000 (00:34 +0100)]
Enhance systemd service file

- Add homepage :-)
- Remote CAP_SETUID and CAP_SETGID from CapabilityBoundingSet: This is
  nor needed, because the unit already sets User=irc and Group=irc.
- Add RestrictAddressFamilies, and restrict it to AF_INET and AF_INET6.
- Read in the Debian "default files", but note: only PARAMS is supported!

2 years agoUpdate Debian package
Alexander Barton [Thu, 5 Jan 2017 23:30:43 +0000 (00:30 +0100)]
Update Debian package

- Update debhelper compatibility to version 9.
- Update build-dependencies.
- Change group of ngircd.conf to "irc" in postinst script (this makes
  starting ngIRCd as user "irc" easier, for example when using systemd).
- Don't create /var/run/ircd during installation: this is handled by the
  SysV init script and the systemd service already.

2 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sat, 10 Dec 2016 23:15:50 +0000 (00:15 +0100)]
Update NEWS and ChangeLog files

2 years agoLog privilege violations and failed OPER as "error" and to &server
Alexander Barton [Thu, 8 Dec 2016 00:34:33 +0000 (01:34 +0100)]
Log privilege violations and failed OPER as "error" and to &server

2 years agoImmediately shut down connection on receiving ERROR
Alexander Barton [Thu, 8 Dec 2016 00:01:40 +0000 (01:01 +0100)]
Immediately shut down connection on receiving ERROR

Don't wait for the peer to close the connection. This allows us to
forward the ERROR mesage in the network, instead of the very generic
"client closed connection" message.

2 years agoXcode: Fix "duplicate symbols" error in current Xcode
Alexander Barton [Wed, 7 Dec 2016 23:56:39 +0000 (00:56 +0100)]
Xcode: Fix "duplicate symbols" error in current Xcode

2 years agox-Line synchronization: Don't send negative durations
Alexander Barton [Wed, 7 Dec 2016 23:22:05 +0000 (00:22 +0100)]
x-Line synchronization: Don't send negative durations

2 years agoList expiration: use same log level as when setting
Alexander Barton [Wed, 7 Dec 2016 23:20:36 +0000 (00:20 +0100)]
List expiration: use same log level as when setting

And log this event to the &SERVER channel, too.

2 years agoRemove leftover debug message. Oops!
Alexander Barton [Wed, 7 Dec 2016 23:18:57 +0000 (00:18 +0100)]
Remove leftover debug message. Oops!

2 years agoG-LINES: Forbid remote modifications if "AllowRemoteOper" is not set
Alexander Barton [Wed, 7 Dec 2016 23:14:00 +0000 (00:14 +0100)]
G-LINES: Forbid remote modifications if "AllowRemoteOper" is not set

Explicitely forbid remote servers to modify "x-lines" (G-LINES) when the
"AllowRemoteOper" configuration option isn't set, even when the command
seems to originate from the remote server itself: this prevents GLINE's
to become set during server handshake in this case (what wouldn't be
possible during regular runtime when a remote IRC Op sends the command)
and what can't be undone by IRC Ops later on (because of the missing
"AllowRemoteOper" option) ...

2 years agoMake scripts and init-files in ./contrib executable
Alexander Barton [Mon, 5 Dec 2016 22:57:19 +0000 (23:57 +0100)]
Make scripts and init-files in ./contrib executable

2 years agoautogen.sh: Fix some shellcheck(1) warning messages
Alexander Barton [Mon, 5 Dec 2016 22:55:16 +0000 (23:55 +0100)]
autogen.sh: Fix some shellcheck(1) warning messages

2 years agoFix building ngIRCd with OpenSSL 1.1
Christoph Biedl [Mon, 5 Dec 2016 19:26:00 +0000 (20:26 +0100)]
Fix building ngIRCd with OpenSSL 1.1

At the moment, ngIRCd fails to build against OpenSSL 1.1 since the
configure check probes for the SSL_library_init symbol which was
removed, but probing for a different function availabe in both versions
solves that problem: SSL_new().

And as SSL_library_init is no longer needed, the patch boils down to
probing SSL_new to assert libssl is available, and disabling the
SSL_library_init invokation from OpenSSL 1.1 on, see also another
application[1] (NSCA-ng) that did pretty much the same.

Patch was compile-tested on both Debian jessie (OpenSSL 1.0.2) and
stretch (OpenSSL 1.1).

[1] <https://www.nsca-ng.org/cgi-bin/repository/nsca-ng/commit/?id=8afc22031ff174f02caad4afc83fa5dff2c29f8a>

(Patch by Christoph, commit message cherry-picked from the email thread
on the mailing list by Alex. Thanks!)

2 years agogcc 6.2 warnings: fix code indentation
Alexander Barton [Mon, 5 Dec 2016 22:33:12 +0000 (23:33 +0100)]
gcc 6.2 warnings: fix code indentation

This fixes the following correct -Wmisleading-indentation warning
messages of gcc 6.2:

irc-write.c: In function ‘IRC_SendWallops’:
irc-write.c:521:4: warning: this ‘if’ clause does not guard...
irc-write.c:524:5: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘if’
irc-write.c:526:4: warning: this ‘if’ clause does not guard... []
irc-write.c:529:5: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘if’

irc-info.c: In function ‘IRC_STATS’:
irc-info.c:895:3: warning: this ‘else’ clause does not guard...
irc-info.c:897:4: note: ...this statement, but the latter is
  misleadingly indented as if it is guarded by the ‘else’

No functional changes, the code has been correct, but the indentation
was wrong ...

2 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Sat, 5 Nov 2016 15:50:55 +0000 (16:50 +0100)]
Update config.guess and config.sub to recent versions

- config.guess: 2016-04-02
- config.sub: 2016-03-30

2 years agoPlatforms.txt: Update systems
Alexander Barton [Fri, 4 Nov 2016 20:49:39 +0000 (21:49 +0100)]
Platforms.txt: Update systems

- Update x86_64/apple/darwin15.6.0 (Apple clang 8.0)
- Update x86_64/unknown/linux-gnu (gcc 4.9.2)
- Update i386/pc/solaris2.11 (gcc 4.8.2), tests have been run both on
  Solaris 11.2 and Solaris 11.3 successfully, but the system identifier
  is the same ... Thanks to Götz Hoffart <goetz@hoffart.de>!

2 years agoPAM.txt: Add note about /etc/pam.d/ngircd permissions
Alexander Barton [Mon, 24 Oct 2016 17:24:21 +0000 (19:24 +0200)]
PAM.txt: Add note about /etc/pam.d/ngircd permissions

2 years agoautogen.sh, ngindent, platformtest.sh: Fix warnings of "shellcheck"
Alexander Barton [Sat, 19 Dec 2015 18:23:50 +0000 (19:23 +0100)]
autogen.sh, ngindent, platformtest.sh: Fix warnings of "shellcheck"

- SC2006: Use $(..) instead of legacy `..`.
- SC2015: Note that A && B || C is not if-then-else. C may run
          when A is true.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

2 years agoUpdate Xcode project for latest Xcode version (8.0)
Alexander Barton [Fri, 21 Oct 2016 19:33:38 +0000 (21:33 +0200)]
Update Xcode project for latest Xcode version (8.0)

3 years agoUpdate Xcode project for latest Xcode version (7.3)
Alexander Barton [Wed, 21 Sep 2016 20:47:40 +0000 (22:47 +0200)]
Update Xcode project for latest Xcode version (7.3)

3 years agoUpdated config.sub to version 2014-09-11
Alexander Barton [Sun, 18 Sep 2016 16:46:44 +0000 (18:46 +0200)]
Updated config.sub to version 2014-09-11

3 years agoAdd "Documentation" variables to systemd configuration files
Alexander Barton [Sun, 18 Sep 2016 16:10:45 +0000 (18:10 +0200)]
Add "Documentation" variables to systemd configuration files

3 years agoMake sure that SYSCONFDIR is always set
Alexander Barton [Fri, 22 Jul 2016 17:01:04 +0000 (19:01 +0200)]
Make sure that SYSCONFDIR is always set

This is useful when ./configure hasn't been run but some source code
linters are run in an editor, for example.

3 years agoAdd "PAMServiceName" configuration option
Alexander Barton [Sun, 5 Jun 2016 23:08:55 +0000 (01:08 +0200)]
Add "PAMServiceName" configuration option

This setting allows to run multiple ngIRCd instances with separate PAM
configurations on each instance. If one sets it to ngircd-foo, PAM will
use /etc/pam.d/ngircd-foo instead of the default /etc/pam.d/ngircd.

Thanks to "somechris" for the patch & pull request!

Closes #226.

3 years agoAdd PAMServiceName setting to specify the used PAM configuration
Christian Aistleitner [Sun, 5 Jun 2016 10:46:56 +0000 (12:46 +0200)]
Add PAMServiceName setting to specify the used PAM configuration

This setting allows to run multiple ngIRCd instances with
PAM configurations on each instance.
If one sets it to "ngircd-foo", PAM will use `/etc/pam.d/ngircd-foo`
instead of the default `/etc/pam.d/ngircd`.

3 years agoAdd an ".editorconfig" file to the project
Alexander Barton [Fri, 6 May 2016 22:43:30 +0000 (00:43 +0200)]
Add an ".editorconfig" file to the project

3 years agoPlatforms.txt: Remove x86_64/unknown/linux-gnu, tcc 0.9.25
Alexander Barton [Sat, 16 Jan 2016 13:31:14 +0000 (14:31 +0100)]
Platforms.txt: Remove x86_64/unknown/linux-gnu, tcc 0.9.25

This combination had been successfully tested with ngIRCd 21, but after
further investigation didn't build correctly: it seems as if tcc fails
to correctly link external libraries (e. g. ngipaddr).

Astonishingly the test suite passed nevertheless, with garbled output,
but without the daemon crashing!?

When using tcc with ngIRCd 23 (and current master), the test suite fails
completely because the daemon crashes ... (which actually is good!)

3 years agoPlatforms.txt: Add systems
Alexander Barton [Sun, 10 Jan 2016 17:05:44 +0000 (18:05 +0100)]
Platforms.txt: Add systems

- Add armv7l/unk./linux-gnueabihf (gcc 4.9.2)
- Add x86_64/unknown/linux-gnu (icc 16)

3 years agoTravis-CI: use "container-based infrastructure"
Alexander Barton [Sun, 10 Jan 2016 18:50:00 +0000 (19:50 +0100)]
Travis-CI: use "container-based infrastructure"

See <https://docs.travis-ci.com/user/migrating-from-legacy/> for
details.

3 years agoplatformtest.sh: Delete ngIRCd binary before test run
Alexander Barton [Sun, 10 Jan 2016 16:44:36 +0000 (17:44 +0100)]
platformtest.sh: Delete ngIRCd binary before test run

This ensures that we definitely don't test an old binary later on ...

3 years agoplatformtest.sh: Only show "runs=Y" when test suite succeeded
Alexander Barton [Sun, 10 Jan 2016 16:39:43 +0000 (17:39 +0100)]
platformtest.sh: Only show "runs=Y" when test suite succeeded

Display "?" in the "runs" colum when the simple "run test" succeeded but
the test suite failed. And display a message to double check the actual
status, because it is somewhat unclear, if the daemon actually "works"
or not in this case.

3 years agoPlatforms.txt: Add and update systems
Alexander Barton [Thu, 7 Jan 2016 01:02:07 +0000 (02:02 +0100)]
Platforms.txt: Add and update systems

- Add i386/pc/minix (clang 3.4)
- Update i686/pc/cygwin (gcc 4.9.3)
- Add x86_64/apple/darwin15.2.0 (Apple clang 7.0)

3 years agoSend_Message: Fix handling of "empty" targets
Alexander Barton [Thu, 7 Jan 2016 00:54:11 +0000 (01:54 +0100)]
Send_Message: Fix handling of "empty" targets

Clients can specify multiple targets for the "PRIVMSG", "NOTICE", and
"SQUERY" commands, separated by commas (e. g. "PRIVMSG a,#b,c :text").

Since commit 49ab79d0 ("Limit the number of message targes, and suppress
duplicates"), ngIRCd crashed when the client sent the separator character
only as target(s), e. g. "," or ",,,," etc.!

This patch fixes the bug and adds a test case for this issue.

Thanks to Florian Westphal <fw@strlen.de> for spotting the issue!

3 years agoUpdate README file
Alexander Barton [Wed, 6 Jan 2016 18:01:25 +0000 (19:01 +0100)]
Update README file

3 years agoPlatforms.txt: Add and update systems
Alexander Barton [Wed, 6 Jan 2016 16:21:54 +0000 (17:21 +0100)]
Platforms.txt: Add and update systems

- Update i586/pc/interix3.5 (gcc 3.3)

- Add i686/pc/linux-gnu (gcc 2.6.3)
- Add i686/pc/linux-gnu (gcc 2.95.2)

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

3 years agoplatformtest.sh: Use $LOGNAME instead of $USER
Alexander Barton [Wed, 6 Jan 2016 14:47:31 +0000 (15:47 +0100)]
platformtest.sh: Use $LOGNAME instead of $USER

LOGNAME is more standard than USER.

3 years agoUpdate copyright notices for 2016
Alexander Barton [Mon, 4 Jan 2016 21:43:58 +0000 (22:43 +0100)]
Update copyright notices for 2016

3 years agoLimit the number of message targes, and suppress duplicates
Alexander Barton [Mon, 4 Jan 2016 21:11:47 +0000 (22:11 +0100)]
Limit the number of message targes, and suppress duplicates

This prevents an user from flooding the server using commands like this:

  PRIVMSG nick1,nick1,nick1,...

Duplicate targets are suppressed silently (channels and clients).

In addition, the maximum number of targets per PRIVMSG/NOTICE/... command
are limited to MAX_HNDL_TARGETS (25). If there are more, the daemon sends
the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing the first target
that hasn't been handled any more.

Closes #187.

3 years agoAdd "_MSG" postfix to ERR_WILDTOPLEVEL_MSG
Alexander Barton [Mon, 4 Jan 2016 21:10:38 +0000 (22:10 +0100)]
Add "_MSG" postfix to ERR_WILDTOPLEVEL_MSG

3 years agoCommands.txt, PRIVMSG: Fix "server mask" description
Alexander Barton [Mon, 4 Jan 2016 20:15:05 +0000 (21:15 +0100)]
Commands.txt, PRIVMSG: Fix "server mask" description

3 years agoEnahnce comments for Send_Message() and Send_Message_Mask()
Alexander Barton [Mon, 4 Jan 2016 19:45:49 +0000 (20:45 +0100)]
Enahnce comments for Send_Message() and Send_Message_Mask()

No functional changes.

3 years agoGet rid of unclever assert() in Send_Message_Mask()
Alexander Barton [Mon, 4 Jan 2016 19:37:13 +0000 (20:37 +0100)]
Get rid of unclever assert() in Send_Message_Mask()

Either we use assert() to _guarantee_ a certain condition, or we use
if(...) to test for it. But never both.

So get rid of the assert() in Send_Message_Mask() and handle the case
that the target mask doesn't contain a dot (".") as regular error,
don't require the caller to assure that any more.

This polishes commit 5a312824.

Please note:
The test in Send_Message() is still _required_ to detect whether the
target is a channel (no dot) or a "target mask" (at least one dot)!

3 years agoTest suite: Add new test for server-server logins
Alexander Barton [Wed, 30 Dec 2015 16:10:26 +0000 (17:10 +0100)]
Test suite: Add new test for server-server logins

This test detects the recent NJOIN breakage, for example ...

3 years agoFix NJOIN handler killing all clients
Alexander Barton [Wed, 30 Dec 2015 13:51:48 +0000 (14:51 +0100)]
Fix NJOIN handler killing all clients

This bug has been introduced by commit 1e386fb7ac which had
the logic reversed :-(

Reported by "ninguno" in #ngircd, thanks a lot!

3 years agocontrib/ngindent: Fix shebang line
Alexander Barton [Sat, 19 Dec 2015 18:21:45 +0000 (19:21 +0100)]
contrib/ngindent: Fix shebang line

3 years agocontrib/platformtest.sh: Warn when external tools are missing
Alexander Barton [Sat, 19 Dec 2015 16:27:27 +0000 (17:27 +0100)]
contrib/platformtest.sh: Warn when external tools are missing

3 years agocontrib/platformtest.sh: Make script more portable
Alexander Barton [Sat, 19 Dec 2015 16:27:03 +0000 (17:27 +0100)]
contrib/platformtest.sh: Make script more portable

3 years agoPlatforms.txt: Add and update systems
Alexander Barton [Sat, 19 Dec 2015 16:08:55 +0000 (17:08 +0100)]
Platforms.txt: Add and update systems

- Update i386/unknown/openbsd3.5 (gcc 2.95.3)
- Update i686/pc/linux-gnu (gcc 2.7.2.1)
- Add x86_64/unknown/linux-gnu (gcc 5.3.0)

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

3 years agodoc/Platforms.txt: Sort list
Alexander Barton [Sat, 19 Dec 2015 16:02:10 +0000 (17:02 +0100)]
doc/Platforms.txt: Sort list

3 years agoMake NJOIN handler more fault-tolerant
Alexander Barton [Sun, 13 Dec 2015 20:56:07 +0000 (21:56 +0100)]
Make NJOIN handler more fault-tolerant

Don't crash the daemon when the NJOIN handler can't join the new client
to a channel (when the Channel_Join() function failed) but try to KILL this
client -- which is the only possible reaction besides crashing: otherwise
the network would get out of sync.

3 years agoIRC_KillClient(): Don't break when called without "Client"
Alexander Barton [Sun, 13 Dec 2015 20:48:31 +0000 (21:48 +0100)]
IRC_KillClient(): Don't break when called without "Client"

The IRC_KillClient() function is documented to handle the case that the
"Client" structure is NULL, so make sure that this actually works and
can't crash the daemon.

Please note:
The current code doesn't make use of this feature, so this fix is
definitely the "right" thing to do but doesn't fix an actual problem.

3 years agoIRC_NJOIN(): Code cleanup
Alexander Barton [Sun, 13 Dec 2015 20:00:46 +0000 (21:00 +0100)]
IRC_NJOIN(): Code cleanup

No functional changes.

3 years agoModes.txt: Add "name prefixes" to channel user mode description
Alexander Barton [Sun, 13 Dec 2015 19:19:05 +0000 (20:19 +0100)]
Modes.txt: Add "name prefixes" to channel user mode description

3 years agoFix NJOIN not propagating "half ops" status
Alexander Barton [Sun, 13 Dec 2015 18:55:47 +0000 (19:55 +0100)]
Fix NJOIN not propagating "half ops" status

ngIRCd tested for the wrong prefix of "half ops" when processing NJOIN
commands and therefore never classified a remote user as "half op".

Thanks to wowaname for pointing this out on #ngircd!

3 years agongIRCd Release 23 rel-23
Alexander Barton [Mon, 16 Nov 2015 20:33:15 +0000 (21:33 +0100)]
ngIRCd Release 23

3 years agoUpdate ChangeLog file
Alexander Barton [Sun, 15 Nov 2015 16:07:56 +0000 (17:07 +0100)]
Update ChangeLog file

3 years agoUpdate doc/Platforms.txt
Alexander Barton [Sun, 15 Nov 2015 16:06:24 +0000 (17:06 +0100)]
Update doc/Platforms.txt

3 years agoExplicitly cast time_t to long when printing it out
Alexander Barton [Sun, 15 Nov 2015 14:14:12 +0000 (15:14 +0100)]
Explicitly cast time_t to long when printing it out

This prevents wrong sizes data types on platforms where time_t doesn't
equal a long any more, for example on OpenBSD.

4 years agocontrib/Debian/changelog: Fix email address
Alexander Barton [Fri, 11 Sep 2015 19:11:38 +0000 (21:11 +0200)]
contrib/Debian/changelog: Fix email address

4 years agoDocumentation: Spelling fixes
Alexander Barton [Sun, 6 Sep 2015 17:38:16 +0000 (19:38 +0200)]
Documentation: Spelling fixes

4 years agongIRCd Release 23~rc1 rel-23-rc1
Alexander Barton [Sun, 6 Sep 2015 14:57:01 +0000 (16:57 +0200)]
ngIRCd Release 23~rc1

4 years agoUpdate AUTHORS and .mailmap file
Alexander Barton [Sun, 6 Sep 2015 14:51:40 +0000 (16:51 +0200)]
Update AUTHORS and .mailmap file

And add a note to doc/HowToRelease.txt to not forget to update the list
of authors in the future ...

4 years agoUpdate ChangeLog file
Alexander Barton [Thu, 3 Sep 2015 15:05:58 +0000 (17:05 +0200)]
Update ChangeLog file

4 years agoAdd ".clang_complete" file
Alexander Barton [Thu, 3 Sep 2015 14:46:48 +0000 (16:46 +0200)]
Add ".clang_complete" file

This file is used of the "linter-clang" package of the Atom editor,
for example.