Annotate "fall through" cases to silence warnings Add a "/* fall through */" annotation to "case" statements which actually should "fall through" to silences GCC warning like this: hash.c: In function ‘jenkins_hash’: hash.c:110:27: warning: this statement may fall through [-Wimplicit-fallthrough=] 110 | case 12: c+=((UINT32)k[11])<<24; | ~^~~~~~~~~~~~~~~~~~~~~
Spelling fixes, mostly in file comments
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!
Allow ircops to use WHO on any channel.
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.
Show allowed channel types in ISUPPORT(005) numeric only Don't show the static list of all possibly available channel types ... Closes #273.
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 ...
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.
Streamline effect of "MorePrivacy" option (WHOIS, LIST) - Update documentation in ngircd.conf(5) - LIST: Don't hide channels for IRC Ops when "MorePrivacy" is in effect - WHOIS: Don't hide IP addresses/hostnames when "MorePrivacy" is in effect Closes #198
Fixed indents 2
Fixed indents and documentation (also updated the copyright date on the txt I edited)
Implement +I (private channel list on whois) Implements enhancement requested in issue #179
Fix "WHO #<chan>" showing invisible users and hiding all visible The logic is reversed ... This bug has been introduced by commit c74115f2, "Simplify mode checking on channels and users within a channel", ngIRCd releases 21, 21.1, and 22 are affected :-( Problem reported by Cahata in #ngircd, Thanks!
Update #include's: remove unused and add missing ones The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been used to find unused #include directives as well as missing ones. Tested on: - A/UX 3.1.1 - ArchLinux (2014-03-17) - Debian GNU/Hurd - Debian GNU/Linux 6.0.9 - Debian GNU/Linux 7.4 - Fedora 20 - FreeBSD 9.2 - OpenBSD 4.8 - OpenBSD 5.1 - OS X 10.9 - Solaris 11
Remove imp.h and exp.h header files These include files don't have a function any more, remove them.
Use correct sender as target for ISUPPORT replies on "VERSION" This fixes commit 2e168c78 ("Return ISUPPORT(005) numerics on 'VERSION'") and make sure, that the 005 numerics are correctly routed back to the sender.
Return ISUPPORT(005) numerics on "VERSION" This is how ircd-seven, Charybdis, Hybrid, and InspIRCd behave, for example.
Show account name in WHOIS This uses the same numeric as Charybdis and ircu families.
Implement new configuration option "Network" The new configuration variable "Network" is used to set the (completely optional) "network name", to which this instance of the daemon belongs. When set, this name is used in the ISUPPORT(005) numeric which is sent to all clients connecting to the server after logging in. Closes bug #165.
Add comments around some IRC_SetPenalty() calls