summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2014-03-17io.c: <sys/time.h> is only needed when using select()Alexander Barton
Only include the <sys/time.h> header when using the select() IO API, it isn't required otherwise.
2014-03-17Remove imp.h and exp.h header filesAlexander Barton
These include files don't have a function any more, remove them.
2014-03-16strdup.c: Code cleanupAlexander Barton
2014-03-16Don't define SSL_Want{Read|Write}() when SSL is disabledAlexander Barton
Not even call the "dummy" functions.
2014-03-16Code cleanup, remove blank linesAlexander Barton
2014-03-16Fix two K&R C portability issuesAlexander Barton
Fix the following two errors emitted by the Apple K&R C compiler on Apple A/UX: "./class.c", line 47: no automatic aggregate initialization "./class.c", line 47: illegal lhs of assignment operator "./conf.c", line 1052: syntax error Tested on A/UX 3.1.1.
2014-02-28Use server password when PAM is compiled in but disabledRoy Sindre Norangshol
2014-02-23CHARCONV: Fix handling conversion errorsAlexander Barton
Don't overwrite already converted text!
2014-02-09Streamline punctuation of log messagesAlexander Barton
See commit d38d153f for details.
2014-02-02IRC_INVITE(): Code cleanupAlexander Barton
2014-02-02Streamline punctuation of log messagesAlexander Barton
See commit d38d153f for details.
2014-01-27Correctly use cloaked IRC masks on "INVITE nickname"Alexander Barton
The cloaked IRC mask of a user is his visible mask, so the daemon has to use it for generating the "one time" entries for the invite list of the given channel. Without this patch, ngIRCd records the real IRC mask which will never match while the target client is "+x", and even worse, will disclose the real mask on "MODE #channel +I" commands :-/ Bug reported by Cahata on #ngircd, thanks!
2014-01-27Use correct sender as target for ISUPPORT replies on "VERSION"Alexander Barton
This fixes commit 2e168c78 ("Return ISUPPORT(005) numerics on 'VERSION'") and make sure, that the 005 numerics are correctly routed back to the sender.
2014-01-26Return ISUPPORT(005) numerics on "VERSION"Alexander Barton
This is how ircd-seven, Charybdis, Hybrid, and InspIRCd behave, for example.
2014-01-20Show account name in WHOISMantas Mikulėnas
This uses the same numeric as Charybdis and ircu families.
2014-01-17Merge branch 'no-range-matching' of git://arthur.barton.de/ngircd-alexAlexander Barton
* 'no-range-matching' of git://arthur.barton.de/ngircd-alex: Remove "range matching" functionality
2014-01-17Fix configure script and "make check" for TCP WrappersAlexander Barton
Add missing #include's and static variables. Problem spotted on OpenBSD.
2014-01-15Remove "range matching" functionalityAlexander Barton
Don't support "range marching" in our pattern matching code using the "[...]" syntax, because [ and ] are valid characters in nick names and one has to quote them currently using the "\" character, which is quite unexpected. For example: Nick "te[st" => "MODE #channel +b te\[st" And remove quoting altogether, too, because "*" and "?" don't need to be quoted because these characters are not allowed in IRC masks, nicks, and hostnames. Reported by "hifi" (Toni Spets) on IRC, thanks!
2014-01-10Client_SetHostname(): Don't use strlen() to test for valueAlexander Barton
2014-01-10Test suite: explicitely enable glibc memory checkingAlexander Barton
2014-01-08Send "fake '*' key" in "MODE -k" repliesAlexander Barton
According to RFC 2812 3.2.3 "Channel mode message" and the examples there, it looks like clients should use "MODE -k <key>" to unset channel keys; and that's how other servers and services behave and do expect it. (But please note that this is NOT the case for "MODE -l"!) In the end, it doesn't make sense to specify a key when UNsetting it at all, and different services behave diffrently when clients do not send the currently set key to unset it - some ignore such calls, for example! But this implementation is quite relaxed, it accepts any key when unsetting channel mode "k" and even accepts no key at all. But the reply will always include an "*" character for every "-k" parameter.
2014-01-04Support non-standard vsnprintf() return codeAlexander Barton
C99 states that vsnprintf() "returns the number of characters that would have been printed if the n were unlimited"; but according to the Linux manual page "glibc until 2.0.6 would return -1 when the output was truncated" -- so we have to handle both cases ...
2014-01-02Update Copyright notices for 2014Alexander Barton
2014-01-02Merge branch 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alexAlexander Barton
* 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alex: WEBIRC: Don't respect hostname when DNS is disabled
2014-01-02Merge branch 'bug165-005-NETWORK' of git://arthur.barton.de/ngircd-alexAlexander Barton
* 'bug165-005-NETWORK' of git://arthur.barton.de/ngircd-alex: Implement new configuration option "Network"
2014-01-01portabtest: Add checks for strdup(), strndup(), and strtok_r()Alexander Barton
2014-01-01portabtest: Actually test functionsAlexander Barton
Test functions snprintf(), strlcpy(), strlcat(), vsnprintf() for correctness, not only existance (which was quite useless, because if they weren't available, the program could not have been linked at all ...).
2013-12-29portabtest: Only use one exit code to indicate errorsAlexander Barton
2013-12-29portabtest: Code cleanupAlexander Barton
2013-12-29Fix permanent k/glineFederico G. Schwindt
Reported by Toni Spets (hifi - at - jnz - dot - fi).
2013-12-27Implement new configuration option "Network"Alexander Barton
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.
2013-12-27WEBIRC: Don't respect hostname when DNS is disabledAlexander Barton
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.
2013-12-27Check for working getaddrinfo() functionAlexander Barton
At least AIX 4.3.3 and 5.1 have a broken implementation of getaddrinfo() which doesn't handle "0" as numeric service correctly. This patch adds a configure check for this case and changes all calling functions to only use getaddrinfo() if it "works". See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html>
2013-12-07Fix spellingFederico G. Schwindt
2013-11-10Only use unsetenv() when it is availableAlexander Barton
AIX 4.3 dosn't support it, for example.
2013-11-09conf-ssl.h: make code compatible with pre-ANSI C compilersAlexander Barton
2013-11-09vsnprintf.c: make code compatible with ansi2knr toolAlexander Barton
2013-11-09Remove unused vsnprintf.c test functionAlexander Barton
2013-11-07Add comments around some IRC_SetPenalty() callsFederico G. Schwindt
2013-11-07Rework the penalty handling slightlyFederico G. Schwindt
Increase the penalty for a command before checking its arguments. This makes the handling more consistent and allow us to move more penalties to Handle_Request().
2013-11-07Move IRC_SetPenalty() to Handle_Request() when possibleFederico G. Schwindt
This centralizes the penalty handling. It also exposes some commands that lack it for our attention.
2013-11-07Introduce a macro to define the command listFederico G. Schwindt
This will pave the way to other changes and simplifies the entries somewhat.
2013-11-07When sending an error use the IRC_WriteErrClient() variantFederico G. Schwindt
This ensures that all errors have a 2 second penalty.
2013-11-06On bad /oper set the penalty to 10 secondsFederico G. Schwindt
This helps against brute-force attempts.
2013-11-06Remove unneded IRC_SetPenalty() callsFederico G. Schwindt
IRC_WriteErrClient() already calls IRC_SetPenalty(). While here convert some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().
2013-11-06Use sizeof() intead of the explicit sizeFederico G. Schwindt
2013-11-01Remove wrong #ifdef in Option_String()Alexander Barton
This fixes the following error when compiling without zlib support: irc.c: In function ‘Option_String’: irc.c:487: error: ‘options’ undeclared (first use in this function) Reported by "der_baer" on #ngircd.
2013-10-23Check and call arc4random_stir() if presentFederico G. Schwindt
FreeBSD prior to 10.0 does not automatically stir on fork(). Same with current NetBSD. If arc4random_stir() is present assume is needed and call it instead of srand().
2013-10-17Add support for longer config linesFederico G. Schwindt
With the introduction of CipherList we could have longer config lines. Handle up to 1024 bytes and warn if the line will be truncated.
2013-10-17Report the correct file on errorFederico G. Schwindt