Commit Graph

3316 Commits

Author SHA1 Message Date
Alexander Barton 4693226d69 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)!
2016-01-04 20:37:13 +01:00
Alexander Barton afb59ab8e5 Test suite: Add new test for server-server logins
This test detects the recent NJOIN breakage, for example ...
2015-12-30 17:10:26 +01:00
Alexander Barton d90f0323e5 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!
2015-12-30 14:55:55 +01:00
Alexander Barton 01e590b007 contrib/ngindent: Fix shebang line 2015-12-19 19:21:45 +01:00
Alexander Barton 7b7ee6a3ca contrib/platformtest.sh: Warn when external tools are missing 2015-12-19 17:27:27 +01:00
Alexander Barton 46838510ab contrib/platformtest.sh: Make script more portable 2015-12-19 17:27:03 +01:00
Alexander Barton 0903343f85 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>!
2015-12-19 17:08:55 +01:00
Alexander Barton 182bfac855 doc/Platforms.txt: Sort list 2015-12-19 17:02:10 +01:00
Alexander Barton 1e386fb7ac 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.
2015-12-13 21:56:07 +01:00
Alexander Barton 52ccba5d1e 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.
2015-12-13 21:53:53 +01:00
Alexander Barton 98e9467c85 IRC_NJOIN(): Code cleanup
No functional changes.
2015-12-13 21:00:46 +01:00
Alexander Barton e8dacb68dc Modes.txt: Add "name prefixes" to channel user mode description 2015-12-13 20:19:05 +01:00
Alexander Barton 398022631a 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!
2015-12-13 19:55:47 +01:00
Alexander Barton f2cef85fde ngIRCd Release 23 2015-11-16 21:33:15 +01:00
Alexander Barton 6ed59a8548 Update ChangeLog file 2015-11-15 17:07:56 +01:00
Alexander Barton 49acb68584 Update doc/Platforms.txt 2015-11-15 17:06:24 +01:00
Alexander Barton d8aba40f07 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.
2015-11-15 15:14:12 +01:00
Alexander Barton 87887bc632 contrib/Debian/changelog: Fix email address 2015-09-11 21:11:38 +02:00
Alexander Barton cb3a4321a2 Documentation: Spelling fixes 2015-09-06 19:38:16 +02:00
Alexander Barton 1e84b2640e ngIRCd Release 23~rc1 2015-09-06 16:57:01 +02:00
Alexander Barton 86d27eaf89 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 ...
2015-09-06 16:51:56 +02:00
Alexander Barton 4acf95ab61 Update ChangeLog file 2015-09-03 17:05:58 +02:00
Alexander Barton 57cd41d289 Add ".clang_complete" file
This file is used of the "linter-clang" package of the Atom editor,
for example.
2015-09-03 16:46:48 +02:00
Alexander Barton eb9929e82c Make server-to-server protocol more robust
Now ngIRCd catches more errors on the server-to-server (S2S) protocol
that could crash the daemon before. This hasn't been a real problem
because the IRC S2S protocol is "trusted" by design, but the behavior
is much better now.

Thanks to wowaname on #ngircd for pointing this out!
2015-09-03 16:22:36 +02:00
Alexander Barton c2e4c304e3 platformtest.sh: Fix quoting 2015-08-27 00:12:50 +02:00
Alexander Barton c56138c280 autogen.sh: Fix parameter quoting 2015-08-27 00:10:41 +02:00
Alexander Barton a1ce3fc779 ngircd.init: Fix non-POSIX "==" test operator 2015-08-27 00:10:18 +02:00
Christoph Biedl ccc899c7f4 Reproducible builds
At the moment ngircd fails the tests for reproducible builds in Debian
since it uses the __DATE__ and __TIME__ macros for the INFO command.

Instead of patching this out I decided to implement an optional
constant BIRTHTIME that allows you to set a time stamp for the "Birth
Date" information, in seconds since the epoch, like in

    export CFLAGS += -DBIRTHTIME=$(shell date +%s --date="2015/08/15 23:42:22")

In the future, Debian will provide a SOURCE_DATE_EPOCH environment
variable, dealing with the situation until then will be my job.

The time format was taken from the NGIRCd_StartStr formatting in
ngircd.c so the "Birth Date" and "On-line since" lines in the INFO
output look similar:

    :irc.example.net 371 nick :ngIRCd 22.1-IDENT+IPv6+IRCPLUS+PAM+SSL+SYSLOG+ZLIB-x86_64/pc/linux-gnu
    :irc.example.net 371 nick :Birth Date: Tue Aug 25 2015 at 18:11:11 (CEST)
    :irc.example.net 371 nick :On-line since Tue Aug 25 2015 at 18:11:33 (CEST)
    :irc.example.net 374 nick :End of INFO list

The format of the time stamped is changed, but as far as I can tell, there's no
rule that is violated by that.

Bonus level: Reformat the messages so the time stamps are aligned.
2015-08-26 10:05:36 +02:00
Alexander Barton 2a52befa56 Update systemd service file 2015-08-14 19:55:32 +02:00
Alexander Barton 2c18e9a7f8 Update NEWS and ChangeLog files 2015-08-07 17:20:47 +02:00
Alexander Barton 9811223fb8 Whitespace fixes (no functional changes) 2015-08-01 15:15:30 +02:00
Alexander Barton 0083fe177f Fix debug message "Client ... is closing connection"
It should be "host:port"!
2015-08-01 15:14:23 +02:00
Alexander Barton 34578b8b30 INSTALL: Add deprecation notice for "PredefChannelsOnly"
Obviously I forgot to list this for ngIRCd 21 ... oops!
2015-08-01 14:52:11 +02:00
Alexander Barton 85dc4d8777 "NoticeAuth" configuration variable is deprecated now! 2015-08-01 14:52:07 +02:00
Alexander Barton 64c265cf33 Merge pull request #217 from SaberUK/master+notice-auth
Use "NOTICE *" before registration instead of "NOTICE AUTH".
2015-08-01 14:51:04 +02:00
Alexander Barton b72a7a4b96 Channel mode "N" is targeted for ngIRCd 23. 2015-08-01 14:26:16 +02:00
Alexander Barton b8482fd3cf First check if channel has mode "N", then check membership
This should be more efficient.
2015-08-01 14:26:11 +02:00
Alexander Barton 90ea23ab4f Merge pull request #214 from Flupsy/channel-mode-N
Channel mode N (users on this channel can't change their nick)
2015-08-01 14:24:20 +02:00
Alexander Barton 6e7e744cc6 Add "build+*" to .gitignore file 2015-07-20 09:34:39 +02:00
Alexander Barton 24cec978ee Remote GIT.txt from Makefile[.am], too! 2015-07-20 09:34:14 +02:00
Alexander Barton a02524465e READNE, AUTHORS: Update mailing list and issue tracker URLs 2015-07-19 03:21:37 +02:00
Alexander Barton 813ea874f8 doc/Contributing.txt: Add note about using GitHub 2015-07-19 03:20:48 +02:00
Alexander Barton 813897023e Remove doc/GIT.txt: it is outdated
ngIRCd uses GitHub, and Git itself is quite common today. So don't
include an own Git "mini HowTo" any longer.
2015-07-19 03:19:41 +02:00
Alexander Barton a5ca8be658 Streamline ".gitignore" files 2015-07-19 03:03:06 +02:00
Alexander Barton c364d67f80 Update NEWS and ChangeLog files 2015-07-19 02:41:03 +02:00
Peter Powell 5545e1bebf Rename NoticeAuth to NoticeBeforeRegistration.
The old name is still supported for compatibility reasons.
2015-07-14 14:43:19 +01:00
Peter Powell d118cd74b6 Use "NOTICE *" before registration instead of "NOTICE AUTH".
AUTH is a valid nickname so sending notices to it is probably not
a good idea. Use * as the target instead as done with numerics
when the nick is not available.

This mimics the behaviour in Charybdis, IRCD-Hybrid, InspIRCd 2.2,
Plexus 4, etc.
2015-07-14 14:37:42 +01:00
Ian Chard 599626d570 Only enforce channel mode N on users (not servers or services) 2015-06-26 10:36:57 +01:00
Alexander Barton 571b1a8b83 Merge pull request #215 from tejr/master
Specify session context for OpenSSL clients.

Closes #182.
2015-06-26 07:41:19 +02:00
Tom Ryder b71a0ddbd5 Specify session context for OpenSSL clients
Reconnecting to ngIRCd 22.1 built with OpenSSL with some OpenSSL
clients, including Pidgin and stunnel 5.06, attempts to reuse a session
and fails due to the absence of this line.

The error message in syslog from ngIRCd is:

> SSL protocol error: SSL_accept (error:140D9115:SSL
> routines:SSL_GET_PREV_SESSION:session id context uninitialized)

This patch appears to fix the problem for both Pidgin and stunnel; it
may work for other OpenSSL clients that attempt to re-use sessions.

*   <https://github.com/ngircd/ngircd/issues/182>
*   <https://developer.pidgin.im/ticket/11568>
*   <https://www.openssl.org/docs/ssl/SSL_CTX_set_session_id_context.html>
2015-06-26 16:21:54 +12:00