Convert uses of Log(LOG_DEBUG, ...) to LogDebug()
Enhance debug logging for PONG commands Distinguish between expected and unexpected PONG commands.
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.
Fix some compiler warnings of Apple Xcode/Clang For example: * src/ngircd/irc-login.c:102:21: Implicit conversion loses integer precision: 'int' to 'char' * src/ngircd/conn.c:1084:9: Implicit conversion turns floating-point number into integer: 'double' to 'bool' * src/tool/tool.c:85:10: Implicit conversion loses integer precision: 'int' to 'char'
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.
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!
First check if channel has mode "N", then check membership This should be more efficient.
Only enforce channel mode N on users (not servers or services)
Don't bother looking for +N channels for an op
Don't use a standard message number
Add channel mode N (normal user can't change nick while on channel)
Auth PING: Fix our information text for manual sending of "PONG" Up to now, ngIRCd doesn't send a valid IRC command at all, oops!
Auth PING: The numeric ID is a "long", use atol()
Auth PING: Don't send a prefix in our PING command The prefix confuses WeeChat, at least, which doesn't send an appropriate PONG in the case ... Debugging and patch by "wowaname" on #ngircd, thanks!
Re-add #include's for header files of the C file itself This partially reverts commit b130b35f4, "Update #include's: remove unused and add missing ones", but fixes the following compiler and analyzer warnings of Apple Xcode 5: "Semantic issue: No previous prototype for function 'yyy'"
Update copyright notices of recently changed files
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.
WEBIRC: Don't respect hostname when DNS is disabled When DNS lookups are disabled, don't set the hostname received by the WEBIRC command, but use the IP address instead. Reported by Toni Spets <toni.spets@iki.fi>, thanks! Closes bug #167.
Remove unneded IRC_SetPenalty() calls IRC_WriteErrClient() already calls IRC_SetPenalty(). While here convert some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().