When "PAMIsOptional" is set, clients not sending a password are still
allowed to connect: they won't become "identified" and keep the "~"
character prepended to their supplied user name.
Alexander Barton [Fri, 30 Dec 2011 13:52:48 +0000 (14:52 +0100)]
Fixed handling of WHO commands
This fixes two bugs:
- "WHO <nick>" returned nothing at all if the user was "+i"
(reported by Cahata, thanks).
- "WHO <nick|nickmask>" returned channel names instead of "*"
when the user was member of a (visible) channel.
Alexander Barton [Wed, 28 Dec 2011 14:07:24 +0000 (15:07 +0100)]
LUSERS reply: only count "visible" channels
Rename Channel_Count() to Channel_CountVisible() and only count channels
that are visible to the requesting client, so the existence of secret
channels is no longer revealed by using LUSERS.
Alexander Barton [Sun, 25 Dec 2011 19:11:43 +0000 (20:11 +0100)]
IRC_xLINE(): output an error message for unexpected "lines"
This fixes:
irc-oper.c: In function ‘IRC_xLINE’:
irc-oper.c:429: warning: ‘class’ may be used uninitialized in this function
irc-oper.c:430: warning: ‘class_c’ may be used uninitialized in this function
Alexander Barton [Sat, 24 Dec 2011 12:16:38 +0000 (13:16 +0100)]
define HAVE_GAI_STRERROR for Mac OS X Xcode builds
On Mac OS X 10.7 Lion, this fixes
In file included from .../contrib/MacOSX/../../src/ngircd/client.c:28:
/Developer/SDKs/MacOSX10.7.sdk/usr/include/netdb.h:272:13:
error: expected identifier or '('
Alexander Barton [Fri, 26 Aug 2011 13:26:38 +0000 (15:26 +0200)]
Implemented user mode "R" and channel mode "R"
- User mode "R": indicates that the nick name of this user is "registered".
This mode isn't handled by ngIRCd itself, but must be set and unset by
IRC services like Anope.
- Channel mode "R": only registered users (having the user mode "R" set)
are allowed to join this channel.
Alexander Barton [Tue, 23 Aug 2011 10:28:04 +0000 (12:28 +0200)]
Introduce DEBUG_BUFFER, rework some debug messages
DEBUG_BUFFER is off by default and therefore disables these messages:
- "Handle_Write() called for connection XX, YY bytes pending ..."
- "Connection XX: ZZ bytes left in read buffer."
Alexander Barton [Sat, 13 Aug 2011 19:04:01 +0000 (21:04 +0200)]
Merge branch 'ServerMode'
* ServerMode:
Handle channel user modes 'a', 'h', and 'q' from remote servers
Handle unknown channel modes on server links
Handle unknown user modes on server links
IRC_MODE(), Client_Mode(): code cleanup [2/2]
Enlarge client user mode buffer, reduce client flags buffer
Infom clients when other servers change their user modes
IRC_MODE(), Client_Mode(): code cleanup [1/2]
Xcode requires Mac OS X 10.6 or newer; Xcode 4 supports this project
format as well, so effectively you can use Mac OS X 10.6.x or 10.7.x
for building ngIRCd with the Apple Xcode IDE.
Handle channel user modes 'a', 'h', and 'q' from remote servers
These channel user modes aren't used for anything at the moment, but
ngIRCd knows that these three modes are "channel user modes" and not
"channel modes", that is that these modes take an "nick name" argument.
Like unknown user and channel modes, these modes are saved and forwarded,
but ignored otherwise.
Enlarge client user mode buffer, reduce client flags buffer
We have to enlage our user mode buffer, so we can handle even unknown
user modes in the future; and reduce the client flags buffer, because
I can't imagine why we ever would need ~100 flags!?
Now we support up to 15 user modes (was: 8) and up to 15 flags (was: 99).
So in the end, we even save 99-15+8-15=77 bytes for each client structure!
Alexander Barton [Sat, 30 Jul 2011 16:47:58 +0000 (18:47 +0200)]
Testsuite: make getpid.sh work even when run as root
Use ps(1) flag "-a" (as well as "-f"):
"Select all processes except both session leaders (see getsid(2)) and
processes not associated with a terminal."
Thanks to Götz Hoffart for reporting this problem!
Alexander Barton [Tue, 19 Jul 2011 14:00:55 +0000 (16:00 +0200)]
Spoofed prefixes: close connection on non-server links only
On server-links, spoofed prefixes can happen because of the asynchronous
nature of the IRC protocol. So don't break server-links, only log a message
and ignore the command.
This fixes bug 113, see:
<https://arthur.barton.de/bugzilla/show_bug.cgi?id=113>
Alexander Barton [Sun, 10 Jul 2011 12:45:33 +0000 (14:45 +0200)]
MorePrivacy: Don't register WHOWAS information
Citing an email from Florian to the ngIRCd mailing list:
"I wonder what the expected behaviour is when Conf_MorePrivacy is changed
from 'yes' to 'no' and the config is reloaded.
At the moment, WHOWAS will start giving out information on Users that
were connected during Conf_MorePrivacy=yes period. If this is not
wanted, Client_RegisterWhowas() should be changed to not store a record
when Conf_MorePrivacy is enabled."
Alexander Barton [Tue, 28 Jun 2011 11:48:33 +0000 (13:48 +0200)]
GnuTLS: use 1024 (DH_BITS_MIN) as minimum size of the DH prime
For outgoing connections, we use 2048 (DH_BITS) since commit 49b2d0e.
This patch enables ngIRCd to accept incoming connections from other servers
and clients that use at least 1024 bits (and no longer requires 2048 for
incoming connections, too).