]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
15 years agoCreate local &SERVER channel and log server messages to it bug87-LocalChannel
Alexander Barton [Mon, 17 Nov 2008 22:27:06 +0000 (23:27 +0100)]
Create local &SERVER channel and log server messages to it

ngIRCd now creates a server-local channel &SERVER with channel modes
+mnPt (moderated, no messages from outside the channel, persistent and
with the topic locked) and logs all the messages to it that a user with
mode +s ("server messages") receives.

If an IRC operator withdraws the +P ("persistent") mode and the &SERVER
channel is freed because of no members, nothing special happens. The
channel can be recerated any time later and ngIRCd would begin logging
to it again.

15 years agoImplement local channels (prefix "&")
Alexander Barton [Thu, 13 Nov 2008 23:42:58 +0000 (00:42 +0100)]
Implement local channels (prefix "&")

This patch implements server-local channels, prefix "&", that are only
visible to users of the same local server and not in the network.

Patch written by Scott Perry (2008-06-04), see:
 - http://arthur.barton.de/cgi-bin/bugzilla/show_bug.cgi?id=87
 - http://arthur.barton.de/cgi-bin/bugzilla/attachment.cgi?id=24&action=view

15 years agoAdded some missing files of GIT tree to distribution archives
Alexander Barton [Thu, 13 Nov 2008 22:17:32 +0000 (23:17 +0100)]
Added some missing files of GIT tree to distribution archives

The following bits and bytes were not included in distribution archives:
 - contrib: ngindent, ngircd.sh
 - contrib/Debian: ngircd.postinst
 - contrib/MacOSX: preinstall.sh, postinstall.sh
 - doc/src: Doxyfile, header.inc.html, footer.inc.html, ngircd-doc.css
 - src/portab: splint.h

15 years agoTest suite: start two servers and test server-server links
Alexander Barton [Thu, 13 Nov 2008 21:46:06 +0000 (22:46 +0100)]
Test suite: start two servers and test server-server links

I changed the test suite to start two test servers (on port 6789 and 6790),
so server-server links can be tested as well for which I included the new
test script "server-link-test.e".

In addition the documentation of the test suite (src/testsuite/README) has
been updated and is more complete now.

15 years agoAdd conf-ssl.h to "noinst_HEADERS"
Alexander Barton [Wed, 12 Nov 2008 23:22:25 +0000 (00:22 +0100)]
Add conf-ssl.h to "noinst_HEADERS"

conf-ssl.h must be listed in "noinst_HEADERS" so that it becomes included
in distribution archives generated by "make dist" and "make distcheck".

15 years agoRe-add CVE identifiers to ChangeLog.
Alexander Barton [Wed, 12 Nov 2008 23:01:07 +0000 (00:01 +0100)]
Re-add CVE identifiers to ChangeLog.

I'm lame. My last commit removed all the CVE numbers recently added in
commit 598df0758 to the ChangeLog ... shame on me!

See all the CVE entries of ngIRCd at:
<http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ngircd>

15 years agoUpdated NEWS and ChangeLog to include 0.12.1 and the development version
Alexander Barton [Wed, 12 Nov 2008 21:34:51 +0000 (22:34 +0100)]
Updated NEWS and ChangeLog to include 0.12.1 and the development version

15 years agoConnection counter: count outgoing connections as well.
Alexander Barton [Wed, 12 Nov 2008 00:23:33 +0000 (01:23 +0100)]
Connection counter: count outgoing connections as well.

This patch lets ngIRCd count outgoing connections as well as incoming
connections (up to now only outgoing connections have been counted). This
change is required because the Conn_Close() function doesn't know whether
it closes an outgoing connection or not and therefore would decrement the
counter below zero when an outgoing connection existed -- which would
trigger an assert() call ...

Please note that this patch changes the (so far undocumented but now fixed)
behaviour of the "MaxConnections" configuration option to account the sum
of the in- and outbound connections!

15 years agoIgnore numeric 020 ("please wait while we process your coinnection")
Alexander Barton [Tue, 11 Nov 2008 22:10:52 +0000 (23:10 +0100)]
Ignore numeric 020 ("please wait while we process your coinnection")

Some servers send the numeric 020 ("please wait while we process your
connection") when a client connects. This is no useful information for
this server, so we simply ignore it :-)

15 years agoGNUTLS: define new API types when installed library is too old
Alexander Barton [Tue, 11 Nov 2008 21:03:11 +0000 (22:03 +0100)]
GNUTLS: define new API types when installed library is too old

This patch enables ngIRCd to use GNUTLS in really old versions, tested
with version 1.0.16, that don't define the "new" data types ending in
xxx_t. LIBGNUTLS_VERSION_MAJOR isn't defined there as well, so we use
it to test if we must define the new types on our own.

15 years agoConsole log: output timestamp (seconds since start) for resolver, too
Alexander Barton [Tue, 11 Nov 2008 21:01:27 +0000 (22:01 +0100)]
Console log: output timestamp (seconds since start) for resolver, too

15 years agoConsole log: output timestamp (seconds since start of daemon)
Alexander Barton [Mon, 10 Nov 2008 17:41:19 +0000 (18:41 +0100)]
Console log: output timestamp (seconds since start of daemon)

15 years agoconn-ssl.c: work around gnutls API problems on 64 bit platforms
Florian Westphal [Wed, 29 Oct 2008 22:51:39 +0000 (23:51 +0100)]
conn-ssl.c: work around gnutls API problems on 64 bit platforms

Alexander Barton reported a compiler warning on 64-bit platforms:
cc1: warnings being treated as errors
conn-ssl.c: In function 'ConnSSL_Init_SSL':
conn-ssl.c:403: error: cast to pointer from integer of
different size

Unfortunately, I couldn't find a real solution; the GNUTLS
API expects 'gnutls_transport_ptr_t' (which is void*),
but the default push/pull functions (send/recv) expect an int.

The only alternative solution is to pass in an address to the
file descriptor, then add send/recv wrappers that expect a pointer.

What a mess[tm].

15 years agoGIT: don't ignore cvs-version.{h|new}, because it isn't used any more.
Alexander Barton [Wed, 29 Oct 2008 21:33:03 +0000 (22:33 +0100)]
GIT: don't ignore cvs-version.{h|new}, because it isn't used any more.

15 years agoFix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"
Alexander Barton [Sun, 19 Oct 2008 18:06:45 +0000 (20:06 +0200)]
Fix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"

This patch fixes the following warning of GCC (version 4.3.2) in
function ForwardLookup():

resolve.c: In function 'ForwardLookup':
resolve.c:282: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:284: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:285: warning: ISO C90 forbids specifying subobject to initialize

15 years agoFix ConnSSL_LogCertInfo(): unused variable "cred" (GNUTLS)
Alexander Barton [Sun, 19 Oct 2008 18:01:26 +0000 (20:01 +0200)]
Fix ConnSSL_LogCertInfo(): unused variable "cred" (GNUTLS)

This patch fixes the following warning of GCC (version 4.3.2) in
function ConnSSL_LogCertInfo() when compiling with GNUTLS support:

conn-ssl.c: In function 'ConnSSL_LogCertInfo':
conn-ssl.c:542: warning: unused variable 'cred'

15 years agoDebian: build ngircd-full with support for GNU TLS and IPv6.
Alexander Barton [Fri, 3 Oct 2008 14:45:09 +0000 (16:45 +0200)]
Debian: build ngircd-full with support for GNU TLS and IPv6.

15 years agoDebian: make sure that /var/run/ircd is owned by user "irc".
Alexander Barton [Fri, 3 Oct 2008 14:43:54 +0000 (16:43 +0200)]
Debian: make sure that /var/run/ircd is owned by user "irc".

15 years agoGIT: Ignore Debian-related generated files.
Alexander Barton [Fri, 3 Oct 2008 13:50:35 +0000 (15:50 +0200)]
GIT: Ignore Debian-related generated files.

Added files that become generated while building Debian GNU/Linux
packages of ngIRCd to the .gitignore lists.

15 years agoUpdated config.{guess|sub} to version 2008-01-16.
Alexander Barton [Fri, 3 Oct 2008 13:35:43 +0000 (15:35 +0200)]
Updated config.{guess|sub} to version 2008-01-16.

15 years agoEnable KICK to be handled from remote servers and from services. services
Alexander Barton [Mon, 18 Aug 2008 14:27:56 +0000 (16:27 +0200)]
Enable KICK to be handled from remote servers and from services.

15 years agoRespect RFC 1459 compatibility mode when announcing channels (no NJOIN).
Alexander Barton [Sun, 17 Aug 2008 23:35:32 +0000 (01:35 +0200)]
Respect RFC 1459 compatibility mode when announcing channels (no NJOIN).

15 years agoDocument the server flag "S": SERVICE command is supported.
Alexander Barton [Sun, 17 Aug 2008 15:35:54 +0000 (17:35 +0200)]
Document the server flag "S": SERVICE command is supported.

15 years agoAnnounce IRC services in the network.
Alexander Barton [Sun, 17 Aug 2008 15:29:41 +0000 (17:29 +0200)]
Announce IRC services in the network.

This patch
 - introduces a new server flag "S" to indicate that the server can handle
   the SERVICE command (on server links),
 - implements the IRC command "SERVICE" for server-server links,
 - uses the "SERVICE" command to announce IRC services when a new
   server connects to it,
 - and fixes the Send_Message() function to let it send messages to
   services using a "target mask".

If the remote server doesn't indicate that it can handle the "SERVICE"
command (it has not set the "S" flag), services are announced as regular
users as before.

15 years agoChange Introduce_Client() to set the correct client type (user/service).
Alexander Barton [Sun, 17 Aug 2008 15:27:45 +0000 (17:27 +0200)]
Change Introduce_Client() to set the correct client type (user/service).

15 years agoConvert SQUERY to PRIVMSG on RFC 1459 compliant links.
Alexander Barton [Sun, 17 Aug 2008 13:19:45 +0000 (15:19 +0200)]
Convert SQUERY to PRIVMSG on RFC 1459 compliant links.

15 years agoDon't allow SQUERY to send to "target masks" and channels; only services!
Alexander Barton [Sun, 17 Aug 2008 13:06:33 +0000 (15:06 +0200)]
Don't allow SQUERY to send to "target masks" and channels; only services!

15 years agoFix PRIVMSG/NOTICE handler (II): keep command when forwarding to channels.
Alexander Barton [Sun, 17 Aug 2008 12:59:36 +0000 (14:59 +0200)]
Fix PRIVMSG/NOTICE handler (II): keep command when forwarding to channels.

- new function ngt_UpperStr().
- change Channel_Write() to take command name and error flag.
- remove now unneeded function Channel_Notice().

15 years agoNew function ngt_UpperStr()
Alexander Barton [Sun, 17 Aug 2008 11:49:32 +0000 (13:49 +0200)]
New function ngt_UpperStr()

15 years agoFix PRIVMSG/NOTICE handler Send_Message(): don't forward NOTICE as PRIVMSG.
Alexander Barton [Sat, 16 Aug 2008 16:26:19 +0000 (18:26 +0200)]
Fix PRIVMSG/NOTICE handler Send_Message(): don't forward NOTICE as PRIVMSG.

15 years agoMake real use of the CLIENT_SERVICE client type.
Alexander Barton [Sat, 16 Aug 2008 15:52:02 +0000 (17:52 +0200)]
Make real use of the CLIENT_SERVICE client type.

This patch enables ngIRCd to handle IRC services as real services, and not
as "fake users":

  - Set correct client type CLIENT_SERVICE for services,
  - Change log messages to include correct client type,
  - PRIVMSG: allow users to send messages to services,
  - Send services nick names to other servers (as users).

Please note that this patch doesn't announce services as services in the
network, but as regular users (as before). Only the local server knows
of services as services (see LUSERS command, for example). It is up to
one of the next patches to fix this and to introduce the SERVICE command
in server to server communication.

The propagation of services as regular users between servers doesn't limit
the functionality of the IRC services and will be the fallback for servers
that don't support "real" services propagation in the future.

15 years agoAllow IRC services to change their nick names.
Alexander Barton [Sat, 16 Aug 2008 15:33:53 +0000 (17:33 +0200)]
Allow IRC services to change their nick names.

15 years agoNew function Client_TypeText() and Destroy_UserOrService().
Alexander Barton [Sat, 16 Aug 2008 15:19:27 +0000 (17:19 +0200)]
New function Client_TypeText() and Destroy_UserOrService().

Client_TypeText() is used to get correct naming ("Client", "Service", ...)
for log messages, and Destroy_UserOrService() is used to correctly destroy
user and services clients.

15 years agoSend_Message(): really enforce target client type.
Alexander Barton [Sat, 16 Aug 2008 12:12:03 +0000 (14:12 +0200)]
Send_Message(): really enforce target client type.

15 years agosample-ngircd.conf & ngircd.conf(5): document "ServiceMask" option.
Alexander Barton [Sat, 16 Aug 2008 00:56:21 +0000 (02:56 +0200)]
sample-ngircd.conf & ngircd.conf(5): document "ServiceMask" option.

15 years agoAllow ngIRCd to detect services connected to an "virtual services server".
Alexander Barton [Sat, 16 Aug 2008 00:36:30 +0000 (02:36 +0200)]
Allow ngIRCd to detect services connected to an "virtual services server".

Introduce a new configuration variable "ServiceMask" in SERVER blocks to
define a mask matching nick names that should be treated as services.
Regular servers don't need this parameter (leave it empty, the default),
but you should set it to "*Serv" when connection ircservices, for example.

This patch allows ngIRCd to detect services, it doesn't change the
functionality: you only get different log messages ;-)

15 years agoCentralize logging functions in Introduce_Client().
Alexander Barton [Fri, 15 Aug 2008 23:24:35 +0000 (01:24 +0200)]
Centralize logging functions in Introduce_Client().

15 years agoGet rid of INTRO_INFO structure again: we don't need it at all!
Alexander Barton [Fri, 15 Aug 2008 22:02:44 +0000 (00:02 +0200)]
Get rid of INTRO_INFO structure again: we don't need it at all!

All the required information is already stored in the CLIENT structure
of new new connection, so pass this to Introduce_Client() and don't
invent an unneeded new structure ...

15 years agoAnnounce_User(): support RFC 1459 compatibility mode.
Alexander Barton [Thu, 14 Aug 2008 22:11:53 +0000 (00:11 +0200)]
Announce_User(): support RFC 1459 compatibility mode.

15 years agoIntroduce_Client(): send MODES in RFC 1459 mode, too.
Alexander Barton [Thu, 14 Aug 2008 22:11:12 +0000 (00:11 +0200)]
Introduce_Client(): send MODES in RFC 1459 mode, too.

15 years agonumeric.c: whitespace fixes ...
Alexander Barton [Thu, 14 Aug 2008 21:43:07 +0000 (23:43 +0200)]
numeric.c: whitespace fixes ...

15 years agoServer links: detect RFC 1459 mode direct after SERVER command
Alexander Barton [Thu, 14 Aug 2008 21:23:04 +0000 (23:23 +0200)]
Server links: detect RFC 1459 mode direct after SERVER command

This patch allows ngIRCd to detect right after receiving the SERVER command
from the peer whether the RFC 1459 compatibility mode must be used or not.
And it fixes the announcement of users during establishing new server links
with such peers.

15 years agoSend and handle NICK+USER commands for user registration (RFC 1459).
Alexander Barton [Wed, 13 Aug 2008 19:55:22 +0000 (21:55 +0200)]
Send and handle NICK+USER commands for user registration (RFC 1459).

This patch enables ngIRCd to deal with NICK and USER commands following
RFC 1459 to register new clients, and to send these commands instead of one
full NICK command as specified in RFC 2813 on connections that are in RFC
1459 compatibility mode.

Can be useful for e. g. IRC services that simulate a RFC 1459 server.

15 years agoNew function IRC_WriteStrServersPrefixFlag_CB() using a callback function.
Alexander Barton [Wed, 13 Aug 2008 15:57:01 +0000 (17:57 +0200)]
New function IRC_WriteStrServersPrefixFlag_CB() using a callback function.

15 years agoNew function Introduce_Client() to announce new local and remote users.
Alexander Barton [Wed, 13 Aug 2008 15:06:26 +0000 (17:06 +0200)]
New function Introduce_Client() to announce new local and remote users.

15 years agoNew connection option CONN_RFC1459.
Alexander Barton [Wed, 13 Aug 2008 14:52:35 +0000 (16:52 +0200)]
New connection option CONN_RFC1459.

This new connection option CONN_RFC1459 indicates that the peer on this
link only supports the IRC protocol as defined in RFC 1459 and that the
compatibility mode (e. g. for outgoing commands like NICK) should be used.

15 years agoNew global function Conn_SetOption().
Alexander Barton [Wed, 13 Aug 2008 14:49:14 +0000 (16:49 +0200)]
New global function Conn_SetOption().

15 years agoUSER: servers and services can alter user information after registration.
Alexander Barton [Wed, 13 Aug 2008 00:24:06 +0000 (02:24 +0200)]
USER: servers and services can alter user information after registration.

This is required to do RFC 1459 style user registration on server links,
and is used by some services packages, too. See RFC 1459 section 4.1.3.

15 years agoNICK: allow servers and services to use RFC 1459 syntax (2 parameters).
Alexander Barton [Wed, 13 Aug 2008 00:00:54 +0000 (02:00 +0200)]
NICK: allow servers and services to use RFC 1459 syntax (2 parameters).

This patch allows servers and services to call the NICK command using the
syntax defined in RFC 1459 to register new users, with only two parameters.
See section 4.1.2.

Useful for some services packages, which emulate this protocol.

15 years agoWhitespace fixes: remove trailing tabulator characters.
Alexander Barton [Tue, 12 Aug 2008 23:55:32 +0000 (01:55 +0200)]
Whitespace fixes: remove trailing tabulator characters.

15 years agoconn-ssl.c: don't append a newline to ConnSSL_GetCipherInfo
Florian Westphal [Mon, 15 Sep 2008 10:25:54 +0000 (12:25 +0200)]
conn-ssl.c: don't append a newline to ConnSSL_GetCipherInfo

15 years agoTLS/SSL support: code changes.
Florian Westphal [Sat, 13 Sep 2008 13:10:32 +0000 (15:10 +0200)]
TLS/SSL support: code changes.

This adds the required code to enable ssl/tls support
during compile and run time, respectively.

15 years agoTLS/SSL support: documentation.
Florian Westphal [Sat, 13 Sep 2008 13:10:08 +0000 (15:10 +0200)]
TLS/SSL support: documentation.

15 years agoTLS/SSL support: core files.
Florian Westphal [Sat, 13 Sep 2008 13:06:35 +0000 (15:06 +0200)]
TLS/SSL support: core files.

Contains support for both OpenSSL and GNU TLS.
Certificate Authentification is not yet supported.

15 years agoFix handling of MaxConnections option
Florian Westphal [Sat, 30 Aug 2008 13:37:19 +0000 (15:37 +0200)]
Fix handling of MaxConnections option

Config option claimed to be 'number of connections' but in reality this
was treated as 'largest file descriptor allowed'.

This also fixes another bug in New_connection, where the
ng_ipaddr_tostr_r error path was missing a return statement.

15 years agoInclude "mcheck.h" when using mtrace().
Alexander Barton [Mon, 18 Aug 2008 21:27:56 +0000 (23:27 +0200)]
Include "mcheck.h" when using mtrace().

15 years agoSECURITY: Fixed a message handling bug which could crash the daemon.
Alexander Barton [Sun, 17 Aug 2008 15:13:39 +0000 (17:13 +0200)]
SECURITY: Fixed a message handling bug which could crash the daemon.

Some message targets could lead to a NULL pointer dereference and therefore
could crash the daemon (denial of service).
(cherry picked from commit e493ad2d30ff80bca2556cde2212e367cb006517)

15 years agoEnable GNU libc "memory tracing" when compiled with debug code.
Alexander Barton [Wed, 13 Aug 2008 14:00:57 +0000 (16:00 +0200)]
Enable GNU libc "memory tracing" when compiled with debug code.

This patch lets ngIRCd activate "memory tracing" of the GNU libc when
compiled with debug code (configure: --enable-debug) and the functionality
is available on the system.
(http://www.gnu.org/software/libc/manual/html_node/Allocation-Debugging.html)

15 years agoNew make target: "osxpkg" to create an Mac OS X installer package.
Alexander Barton [Tue, 12 Aug 2008 15:30:38 +0000 (17:30 +0200)]
New make target: "osxpkg" to create an Mac OS X installer package.

This patch adds a new make target, "osxpkg", to the main Makefile which
gereates a Apple Mac OS X installer package of ngIRCd. The packagemaker(1)
project bundle is stored in contrib/MacOSX/ngIRCd.pmdoc.

15 years agoClean up Mac OS X Xcode environment.
Alexander Barton [Mon, 11 Aug 2008 15:39:26 +0000 (17:39 +0200)]
Clean up Mac OS X Xcode environment.

- Remove obsolete contrib/MacOSX/cvs-version.h
- Change SDK to 10.4

15 years agodoc/Platforms.txt: added Debian GNU/Hurd, "i686/unknown/gnu0.3"
Alexander Barton [Sun, 10 Aug 2008 16:08:09 +0000 (18:08 +0200)]
doc/Platforms.txt: added Debian GNU/Hurd, "i686/unknown/gnu0.3"

15 years agoAdded CVE identifiers to ChangeLog.
Alexander Barton [Sun, 10 Aug 2008 12:26:51 +0000 (14:26 +0200)]
Added CVE identifiers to ChangeLog.

see http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ngircd

15 years agoRemove de.barton.ngircd.plist on "make clean", its a generated file.
Alexander Barton [Wed, 6 Aug 2008 17:47:53 +0000 (19:47 +0200)]
Remove de.barton.ngircd.plist on "make clean", its a generated file.

15 years agoMake ngIRCd compile and run on NeXTSTEP 3.3 and OPENSTEP 4.2
Alexander Barton [Fri, 1 Aug 2008 14:21:16 +0000 (16:21 +0200)]
Make ngIRCd compile and run on NeXTSTEP 3.3 and OPENSTEP 4.2

by Steven D. Blackford <kb7sqi@aol.com>:

"I wanted to let you know that I've done a quick port of ngircd-0.12.0 for
NEXTSTEP3.3/OPENSTEP4.2. There wasn't a lot of changes required to get it
to compile clean, but I did make the necessary changes so that I didn't
have to use -posix flag. The NeXT has a pretty buggy POSIX implementation
so I always try to work around it. :-)
Anway, here's the changes required to get it to compile."

15 years agoMerge branch 'master' of git://ngircd.barton.de/ngircd
Alexander Barton [Thu, 31 Jul 2008 12:36:39 +0000 (14:36 +0200)]
Merge branch 'master' of git://ngircd.barton.de/ngircd

15 years agoInstall /Library/LaunchDaemons/de.barton.ngircd.plist into $(DESTDIR)
Alexander Barton [Thu, 31 Jul 2008 12:35:22 +0000 (14:35 +0200)]
Install /Library/LaunchDaemons/de.barton.ngircd.plist into $(DESTDIR)

15 years agoFAQ: add entry about /OPER and OperCanUseMode
Florian Westphal [Thu, 31 Jul 2008 12:11:05 +0000 (14:11 +0200)]
FAQ: add entry about /OPER and OperCanUseMode

15 years agoGIT: added src/testsuite/message-test to ignore list.
Alexander Barton [Sun, 27 Jul 2008 18:51:37 +0000 (20:51 +0200)]
GIT: added src/testsuite/message-test to ignore list.

15 years agoFix Validate_Args(): unused parameter "Idx" and "Req"
Alexander Barton [Sun, 27 Jul 2008 18:35:01 +0000 (20:35 +0200)]
Fix Validate_Args(): unused parameter "Idx" and "Req"

This patch fixes the following error message of GCC (tested with version
4.3.0) when not compiling ngIRCd in "strict RFC" mode:

parse.c: In function "Validate_Args":
parse.c:341: error: unused parameter "Idx"
parse.c:341: error: unused parameter "Req"

15 years agomessage-test: Disable two tests using "localhost" as host name
Alexander Barton [Sun, 27 Jul 2008 16:03:13 +0000 (18:03 +0200)]
message-test: Disable two tests using "localhost" as host name

Some operating systems, for example OpenBSD and OpenSolaris, use
"localhost.<domain>" instead of just "localhost" for 127.0.0.1, so
the "message-test" using "localhost" failed on such systems.

Don't have an idee how to make this work on all platforms ... :-/

So I simply disabled the two affected tests to make the testsuite
run on OpenBSD and OpenSolaris again.

15 years agoFix Send_Message(): "lastCurrentTarget" may be used uninitialized
Alexander Barton [Sun, 27 Jul 2008 15:11:40 +0000 (17:11 +0200)]
Fix Send_Message(): "lastCurrentTarget" may be used uninitialized

This patch fixes the following warning of GCC 4.3.1:

irc.c: In function "Send_Message":
irc.c:315: error: "lastCurrentTarget" may be used uninitialized in
this function

15 years agoFix t_diff(): declaration of 'div' shadows a global declaration
Alexander Barton [Sun, 27 Jul 2008 13:58:06 +0000 (15:58 +0200)]
Fix t_diff(): declaration of 'div' shadows a global declaration

This patch fixes the following GCC warning message:
irc-info.c:422: warning: declaration of 'div' shadows a global declaration

15 years agoCosmetic whitespace and line length fixes, mostly in Send_Message(). bug77-PRIVMSG-NOTICE
Alexander Barton [Sun, 27 Jul 2008 13:50:51 +0000 (15:50 +0200)]
Cosmetic whitespace and line length fixes, mostly in Send_Message().

15 years agoAdded "message-test" to Makefile, so it is distrubuted and run.
Alexander Barton [Sun, 27 Jul 2008 12:45:04 +0000 (14:45 +0200)]
Added "message-test" to Makefile, so it is distrubuted and run.

15 years agoCleaned up PRIVMSG and NOTICE patches.
Brandon Beresini [Fri, 13 Jun 2008 04:54:05 +0000 (21:54 -0700)]
Cleaned up PRIVMSG and NOTICE patches.

15 years agoCumulative Message Patch
Brandon Beresini [Wed, 11 Jun 2008 18:35:50 +0000 (11:35 -0700)]
Cumulative Message Patch

15 years agoDon't allow empty channel names ("#") in strict RFC mode.
Alexander Barton [Tue, 22 Jul 2008 11:22:54 +0000 (13:22 +0200)]
Don't allow empty channel names ("#") in strict RFC mode.

This closes Bug #88.

Patch proposed by Eric <egrunow@ucsd.edu>, but with wrong length
comparision: please note that Channel_IsValidName() checks the name
INCLUDING the prefix, so the test must be length<=1!

15 years agoReturn 461 (syntax error) on "JOIN :" and "PART :"
Alexander Barton [Tue, 22 Jul 2008 11:18:19 +0000 (13:18 +0200)]
Return 461 (syntax error) on "JOIN :" and "PART :"

Up to this patch ngIRCd did not return any result (GIT master) or a badly
formated 403 (":irc.server 403 test  :No such channel" [note the two
spaces!], branch-0-12-x) on the above commands, this patch changes the
behaviour to reflect ircd 2.11 which returns 461 in both cases.

15 years agoChannel_Join(): Code cleanup.
Alexander Barton [Tue, 22 Jul 2008 11:07:57 +0000 (13:07 +0200)]
Channel_Join(): Code cleanup.

15 years agoAdded more supported and tested platforms to doc/Platforms.txt.
Alexander Barton [Mon, 21 Jul 2008 12:59:28 +0000 (14:59 +0200)]
Added more supported and tested platforms to doc/Platforms.txt.

15 years agoFixes to misc-test: accept "localhost.<domain>" as well as "localhost"
Alexander Barton [Mon, 21 Jul 2008 11:40:22 +0000 (13:40 +0200)]
Fixes to misc-test: accept "localhost.<domain>" as well as "localhost"

Some operating systems, for example OpenBSD, use "localhost.<domain>"
instead of "localhost", so the "who-test" expecting "localhost" failed
on such systems.

(Please see 149859c5fecc..., which fixes this for the who-test already)

15 years agoRevert "dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]"
Alexander Barton [Wed, 9 Jul 2008 16:36:40 +0000 (18:36 +0200)]
Revert "dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]"

- Solaris needs both -lsocket _and_ -lnsl
- A/UX needs -lUTIL

"... which totally sucks because we'd link libnsl on Linux, too
(where its not needed at all). So, we have to figure out how to tell
autocrap to NOT put -lnsl there unless it exports a symbol we need.
This also means that [...] has to be reverted (or done properly)."
-- Florian Westphal @ #ngircd

This reverts commit 2b14234abc252383679bae2d23861b773dc9713e.

15 years agodpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]
Florian Westphal [Mon, 30 Jun 2008 20:50:42 +0000 (22:50 +0200)]
dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]
(they use none of its symbols).

So, rip out that AC_CHECK_LIB cruft, pointed out by Christoph Biedl.

If there are platforms that really need that we should
only link when we actually use these libraries.

15 years agoMerge autogen.sh changes
Alexander Barton [Fri, 27 Jun 2008 04:07:41 +0000 (06:07 +0200)]
Merge autogen.sh changes

Merge commit 'alex/master'

15 years agoautogen.sh: Don't set AUTO{CONF|MAKE}_VERSION and WANT_AUTO{CONF|MAKE}
Alexander Barton [Fri, 27 Jun 2008 03:55:45 +0000 (05:55 +0200)]
autogen.sh: Don't set AUTO{CONF|MAKE}_VERSION and WANT_AUTO{CONF|MAKE}

On some systems (for example Gentoo Linux, FreeBSD, and OpenBSD), these
variables are used to select which version of GNU automake and autoconf
to use, but we shouldn't depend on a specific version -- instead we
should use the "system default". So probably it is up to the user to
set these variables accordingly to set up some wrapper scripts of his
operating system distribution.

15 years agoautogen.sh: correctly test for and export ACLOCAL variable
Alexander Barton [Fri, 27 Jun 2008 03:44:04 +0000 (05:44 +0200)]
autogen.sh: correctly test for and export ACLOCAL variable

15 years agoTranslated comments from German to English
Eric Grunow [Fri, 13 Jun 2008 00:27:07 +0000 (17:27 -0700)]
Translated comments from German to English

15 years agoFix GCC warnings for possibly uninitialized variables in IRC_JOIN
Alexander Barton [Mon, 16 Jun 2008 11:07:50 +0000 (13:07 +0200)]
Fix GCC warnings for possibly uninitialized variables in IRC_JOIN

This patch fixes the following two warnings of GCC 4.2.4:

irc-channel.c: In function "IRC_JOIN":
irc-channel.c:185:
 warning: "lastkey" may be used uninitialized in this function
irc-channel.c:185:
 warning: "lastchan" may be used uninitialized in this function

15 years agoGIT: added src/src/config.h.in~ to ignore list.
Alexander Barton [Wed, 11 Jun 2008 14:02:06 +0000 (16:02 +0200)]
GIT: added src/src/config.h.in~ to ignore list.

15 years agoAllow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode
Alexander Barton [Wed, 11 Jun 2008 14:00:38 +0000 (16:00 +0200)]
Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode

Up to now ngIRCd accepted CR+LF as well as a single CR or LF in "non RFC
compliant" mode (the default). But ngIRCd became confused when it received
data containing mixed line endings (e. g. "111\r222\n333\r\n").

This patch enables ngIRCd (in "non RFC compliant" mode) to detect CR+LF,
CR, and LF as equally good line termination sequences and to always end the
command after the first one detected.

Some clients (for exmaple Trilian) are that ... broken to send such mixed
line terminations ...

First patch proposed by Scott Perry <scperry@ucsd.edu>,
Thanks to Ali Shemiran <ashemira@ucsd.edu> for testing!

15 years agoDon't allow stray \r or \n in command parameters
Alexander Barton [Fri, 30 May 2008 12:49:56 +0000 (14:49 +0200)]
Don't allow stray \r or \n in command parameters

If ngircd receives an input line like "COMMAND arg\nIRRELEVANT\r\n",
"arg\nIRRELEVANT" is passed as an argument to COMMAND. This can lead
to output like:

:ngircd.test.server 322 nick #chan 1 :
topicwithprecedingnewline
:ngircd.test.server 322 nick #nxtchan 1 :
[..]

Worse, this allows clients to piggyback irc commands, e.g.
"TOPIC #a :test\n:fake!~a@nonexistant JOIN :#a\r\n", which
causes the client to receive a JOIN command during /LIST output.

Bug reported by Scott Perry, first patch by Florian Westphal.

15 years agoGIT: ignore de.barton.ngircd.plist, it is a generated file.
Alexander Barton [Wed, 28 May 2008 01:00:22 +0000 (03:00 +0200)]
GIT: ignore de.barton.ngircd.plist, it is a generated file.

15 years agongircd.init: use LSB logging functions, if available.
Alexander Barton [Tue, 27 May 2008 23:50:18 +0000 (01:50 +0200)]
ngircd.init: use LSB logging functions, if available.

15 years ago--configtest: return non-zero exit code if there are errors
Alexander Barton [Tue, 27 May 2008 22:31:20 +0000 (00:31 +0200)]
--configtest: return non-zero exit code if there are errors

15 years agoHandle_Buffer(): code cleanup.
Alexander Barton [Mon, 26 May 2008 21:38:32 +0000 (23:38 +0200)]
Handle_Buffer(): code cleanup.

Both callers ignore the return code of this function, so get rid of it,
but make sure that the client is disconnected on errors.

15 years agoConn_Handler(): cleanup code, add/translate comments.
Alexander Barton [Mon, 26 May 2008 19:38:27 +0000 (21:38 +0200)]
Conn_Handler(): cleanup code, add/translate comments.

In addition, the "timeout" variable has been removed because it is
unnecessary today: Handle_Buffer() handles all the data it can handle,
and io_dispatch() returns immediately when new data is available. So
we don't have to double-check but better sleep. Pointed out by Florian.

15 years agoUse strtok_r instead of strchr in IRC_JOIN.
Scott Perry [Mon, 26 May 2008 10:38:15 +0000 (12:38 +0200)]
Use strtok_r instead of strchr in IRC_JOIN.

This patch does significant cleanup on the join code by using strtok_r
instead of mangling strchr to parse channel names and keys in parallel when
a JOIN command contains a list of channels and keys.

Also adds an strtok_r implementation to libportab.

15 years agoMac OS X LaunchDaemon script: log messages to /Library/Logs/ngIRCd.log
Alexander Barton [Mon, 26 May 2008 15:48:02 +0000 (17:48 +0200)]
Mac OS X LaunchDaemon script: log messages to /Library/Logs/ngIRCd.log

15 years agoconfigure.in: don't check for "obvious" standard functions.
Florian Westphal [Sun, 25 May 2008 18:16:25 +0000 (20:16 +0200)]
configure.in: don't check for "obvious" standard functions.

Drop checks for the following C standard functions:
malloc, memmove, memset, realloc, strchr, strcspn, strerror, strstr.

Rationale: These are standard K&R/C89 functions, no point in
''making sure they exist''.

15 years agoReset client idle time on NICK, JOIN, and PART
Alexander Barton [Sat, 24 May 2008 19:50:54 +0000 (21:50 +0200)]
Reset client idle time on NICK, JOIN, and PART