Spelling fixes, mostly in file comments
Log G-/K-Line changes only when not initiated by a server This prevents the log from becomming spammed during "net bursts".
Log privilege violations and failed OPER as "error" and to &server
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) ...
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!
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.
Streamline punctuation of log messages See commit d38d153f for details.
Fix permanent k/gline Reported by Toni Spets (hifi - at - jnz - dot - fi).
Add comments around some IRC_SetPenalty() calls
On bad /oper set the penalty to 10 seconds This helps against brute-force attempts.
Remove unneded IRC_SetPenalty() calls IRC_WriteErrClient() already calls IRC_SetPenalty(). While here convert some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().
Actually KILL clients on GLINE/KLINE Kill all clients that match a new GLINE/KLINE mask and genrate apropriate KILL commands. These KILL commands can be superfluous, but are required when the IRC Operator isn't allowd to set remote G-Lines or if there are older servers in the network that don't kill clients on GLINE/KLINE. Closes bug #156.
Remove CLIENT.oper_by_my, Client_SetOperByMe() and Client_OperByMe() All places where Client_OperByMe() is used can either be converted to Client_HasMode(Client, 'o') or Op_Check(). And Op_Check() itself can use the connection handle for deciding whether the IRC Operator is a local user or not.
Add more penalty times Ensure before every numeric 461 there is a call to IRC_SetPenalty().
Rework check for number of parameters Move most of the checks that return numeric 461 into Handle_Request().
Reorder checks Move oper and Conf_MorePrivacy checks after checking the number of parameters.
Introduce new function IRC_WriteErrClient() This function is used to send "error messages", including numerics, back to clients and to automatically enforce a 2 second penalty. With this patch, all error results enforces a delay for the client. All callers of IRC_WriteStrClient(ERR_xxx) have been converted. Please note that this patch prolongs the time "make check" needs to complete its tests, because of lots of new enforced penalties ...