Commit Briefs
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.
Enahnce comments for Send_Message() and Send_Message_Mask()
No functional changes.
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)!
Test suite: Add new test for server-server logins
This test detects the recent NJOIN breakage, for example ...
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!
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>!
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.
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.
IRC_NJOIN(): Code cleanup
No functional changes.
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!
ngIRCd Release 23 (tags/rel-23)
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.
ngIRCd Release 23~rc1 (tags/rel-23-rc1)
