]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
15 years agoTLS/SSL: remove useless error message when ssl connection is closed
Florian Westphal [Thu, 5 Feb 2009 22:42:56 +0000 (23:42 +0100)]
TLS/SSL: remove useless error message when ssl connection is closed

When using OpenSSL, the following annoying "error" message was logged whenever
an encrypted connection was shut down in a orderly fashion:
TLS/SSL Connection shutdown: ConnSSL_Read: Unable to determine error

of course, this isn't an error at all.

15 years agoupdate ChangeLog.
Florian Westphal [Wed, 4 Feb 2009 22:33:46 +0000 (23:33 +0100)]
update ChangeLog.

15 years agoSSL/TLS: clear all ssl realted flags on shutdown
Florian Westphal [Wed, 4 Feb 2009 22:23:12 +0000 (23:23 +0100)]
SSL/TLS: clear all ssl realted flags on shutdown

one ssl related flags was not cleared on ssl shutdown.
introduce and use CONN_SSL_FLAGS_ALL to zap them all.

15 years agoTLS/SSL: fix memory leak when using compressed server links with ssl
Florian Westphal [Wed, 4 Feb 2009 22:01:53 +0000 (23:01 +0100)]
TLS/SSL: fix memory leak when using compressed server links with ssl

commit 6bc2d3d06e9cb4da68ea4b63d9b6b219d88ab927
(New connection option CONN_RFC1459) forgot to adjust the ssl bitmasks.

The result is that when a compressed AND encrypted server link goes down
the memory allocated by zlib and the r/w buffers are no longer
free'd as the previous ConnSSL_Free() would then also remove the CONN_ZIP flag
from the flag mask.

15 years agoFix spelling of log message: "channek" vs. "channel" ... ChannelKeyFile
Alexander Barton [Fri, 9 Jan 2009 19:18:23 +0000 (20:18 +0100)]
Fix spelling of log message: "channek" vs. "channel" ...

15 years agoChannel key file: store file name and open on each access.
Alexander Barton [Sun, 4 Jan 2009 16:26:50 +0000 (17:26 +0100)]
Channel key file: store file name and open on each access.

Store the file name of channel key files and reopen them on each access
(on each JOIN command) insted of just storing the file handles.

This eliminates the special requirements (no delete) and makes sure
that always the actual file contents are used in all circumstances.

15 years agoSupport individual channel keys for pre-defined channels.
Alexander Barton [Thu, 1 Jan 2009 21:26:13 +0000 (22:26 +0100)]
Support individual channel keys for pre-defined channels.

This patch introduces the new configuration variable "KeyFile" for
[Channel] sections in ngircd.conf. Here a file can be configured for each
pre-defined channel which contains individual channel keys for different
users. This file is line-based and must have the following syntax:

  <user>:<nick>:<key>

<user> and <nick> can contain the wildcard character "*".

Please not that these channel keys are only in effect, when the channel
has a regular key set using channel mode "k"!

15 years agoRFC 2812, sec. 3.3.1: really check for the last dot
Alexander Barton [Tue, 20 Jan 2009 15:49:34 +0000 (16:49 +0100)]
RFC 2812, sec. 3.3.1: really check for the last dot

This fixes commit 5a3128243f4b60 and makes the test suite ("make check")
run again without errors.

15 years agoirc.c: reject masks with wildcard after last dot
Florian Westphal [Sat, 17 Jan 2009 23:33:34 +0000 (00:33 +0100)]
irc.c: reject masks with wildcard after last dot

RFC 2812 says in section 3.3.1 ("Private Messages"):

The mask MUST have at least 1 (one) "." in it and no wildcards
following the last ".".

15 years agoirc.c: Fix handling of channels containing dots
Florian Westphal [Sat, 17 Jan 2009 23:12:28 +0000 (00:12 +0100)]
irc.c: Fix handling of channels containing dots

commit 2546a13ad2949192eb70bf21e114ec60af287ee4
('Cumulative Message Patch') broke PRIVMSG to channels
containing dots.

Fix this by switching evaluation order:
Check first if the target matches a existing channel and only do a check
for target masks if that failed.

PRIVMSG with host/server masks is described in RFC 2812, section 3.3.1.

Makes one wonder how a server is _really_ supposed to tell the difference
between hostmasks and channel names.

Sigh.

15 years agoUpdate ngircd.spec file
Ask Bjørn Hansen [Tue, 13 Jan 2009 07:31:18 +0000 (23:31 -0800)]
Update ngircd.spec file

- Change Copyright to License
- Update URL
- Make BuildRoot use %{_tmppath} macro
- Add basic BuildRequires
- Compile with zlib and openssl
- Install all docs in standard document location

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
15 years agoremove unneeded LOG_DEBUG when not compiling with DEBUG support
Florian Westphal [Fri, 9 Jan 2009 23:44:34 +0000 (00:44 +0100)]
remove unneeded LOG_DEBUG when not compiling with DEBUG support

when ngircd is build without DEBUG enabled, LOG_DEBUG messages
are always discarded.

To avoid the extra code, ngircd has a LogDebug() wrapper which
gets removed by the compiler when compiling without DEBUG defined.

Update a few functings which were using the
Log(LOG_DEBUG, .. interface directly without #ifdef DEBUG guards.

   text    data     bss     dec     hex filename
 127748    1900   28280  157928   268e8 ngircd.before
 126836    1896   28280  157012   26554 ngircd.after

15 years agodocumentation: gnutls does not support password-protected privkeys
Florian Westphal [Fri, 9 Jan 2009 20:30:43 +0000 (21:30 +0100)]
documentation: gnutls does not support password-protected privkeys

already mentioned in man page and sample config file, but for
completeness also document it in doc/SSL.txt.

15 years agoMac OS X: update texts for Mac OS X Installer.app
Alexander Barton [Tue, 6 Jan 2009 16:40:25 +0000 (17:40 +0100)]
Mac OS X: update texts for Mac OS X Installer.app

15 years agoXcode: build ngIRCd with IPv6 support on Mac OS X
Alexander Barton [Tue, 6 Jan 2009 16:39:11 +0000 (17:39 +0100)]
Xcode: build ngIRCd with IPv6 support on Mac OS X

15 years agoXcode: get release number dynamically; new make target "xcode-clean".
Alexander Barton [Tue, 6 Jan 2009 15:01:52 +0000 (16:01 +0100)]
Xcode: get release number dynamically; new make target "xcode-clean".

- make target "xcode" now detects the release number stored in the
  configure.in file and passes it to Xcode.
- new make target "xcode-clean" which removes all files generated by
  "make xcode" and removes the Xcode build directory.

15 years agoXcode: define TARGET_VENDOR and TARGET_OS
Alexander Barton [Tue, 6 Jan 2009 15:00:15 +0000 (16:00 +0100)]
Xcode: define TARGET_VENDOR and TARGET_OS

15 years agoAdd new and missing files to Mac OS X Xcode project
Alexander Barton [Tue, 6 Jan 2009 14:09:39 +0000 (15:09 +0100)]
Add new and missing files to Mac OS X Xcode project

15 years agoRename Channel_Free() to Free_Channel(), it is a local function
Alexander Barton [Mon, 5 Jan 2009 12:53:33 +0000 (13:53 +0100)]
Rename Channel_Free() to Free_Channel(), it is a local function

15 years agoClean up channel allocation table on shutdown/restart.
Alexander Barton [Mon, 5 Jan 2009 11:58:37 +0000 (12:58 +0100)]
Clean up channel allocation table on shutdown/restart.

Silly bug: the condition of a while() loop in the Channel_Exit() function
used the wrong variable and therefore got never executed ...

This bug is in the code since the beginning (see commit bb19cfda in 2002);
shame on me!

15 years agoAdd Channel_Free().
Florian Westphal [Sun, 4 Jan 2009 21:50:49 +0000 (22:50 +0100)]
Add Channel_Free().

Central function to free a channel structure and all its resources
(invite/ban lists, topic, ...).

15 years agoClean up (reformat and comment) Delete_Channel() function.
Alexander Barton [Sun, 4 Jan 2009 14:25:07 +0000 (15:25 +0100)]
Clean up (reformat and comment) Delete_Channel() function.

15 years agoFree topic array on channel deletion.
Alexander Barton [Sun, 4 Jan 2009 14:22:32 +0000 (15:22 +0100)]
Free topic array on channel deletion.

The topic array in the CHANNEL structure must be free()'d before the
channel itself becomes deleted.

15 years agoFix spelling in some documents.
Alexander Barton [Thu, 1 Jan 2009 16:56:42 +0000 (17:56 +0100)]
Fix spelling in some documents.

15 years agoAllow pre-defined server local channels ("&").
Alexander Barton [Tue, 30 Dec 2008 18:23:03 +0000 (19:23 +0100)]
Allow pre-defined server local channels ("&").

15 years agoSpell check and enhance ngIRCd manual pages.
Alexander Barton [Tue, 30 Dec 2008 18:20:09 +0000 (19:20 +0100)]
Spell check and enhance ngIRCd manual pages.

15 years agoman ngircd.conf: line break missing before the SSLConnect description
Florian Westphal [Mon, 29 Dec 2008 22:34:20 +0000 (23:34 +0100)]
man ngircd.conf: line break missing before the SSLConnect description

reported by Christoph Biedl.

15 years agodefines.h: remove MAX_LISTEN_PORTS, MAX_SERVICES
Florian Westphal [Sat, 27 Dec 2008 22:50:32 +0000 (23:50 +0100)]
defines.h: remove MAX_LISTEN_PORTS, MAX_SERVICES

_SERVICES was never used; _LISTEN_PORTS is a leftover from
commit 51ccb5928ad1453b0593fedd934298384d09e619
('internal changes needed for future ssl support').

15 years agoRemove limit on max number of predefined channels.
Florian Westphal [Mon, 24 Nov 2008 21:59:10 +0000 (22:59 +0100)]
Remove limit on max number of predefined channels.

This resolves Bugzilla Bug 68 ('Too many pre-defined channels configured.')

15 years agochannel.c: constify a few function arguments.
Florian Westphal [Sat, 22 Nov 2008 23:39:32 +0000 (00:39 +0100)]
channel.c: constify a few function arguments.

15 years agouse %ld as format specifier for posix data types
Florian Westphal [Wed, 17 Dec 2008 22:27:25 +0000 (23:27 +0100)]
use %ld as format specifier for posix data types

in the same vein as the earlier commit:
cast posix data types (pid_t, ...) to long and use
%ld as format specifier. This will avoid problems
when sizeof(int) != sizeof(type).

We could also cast to int, but this might truncate the value.

15 years agongIRCd release 13 rel-13
Alexander Barton [Thu, 25 Dec 2008 22:18:29 +0000 (23:18 +0100)]
ngIRCd release 13

15 years agodon't print pid_t type with %ld format specifier
Florian Westphal [Wed, 17 Dec 2008 21:55:20 +0000 (22:55 +0100)]
don't print pid_t type with %ld format specifier

Reported by Christoph Biedl:
ngircd[21581]: Running as user irc(39), group irc(39), with PID 140733193409613.

cast pid_t to long to avoid this.
While we are there, cast uid_t and gid_t, too.

15 years agoUpdate the date ("Dec 2008") of the manual pages.
Alexander Barton [Fri, 5 Dec 2008 23:20:59 +0000 (00:20 +0100)]
Update the date ("Dec 2008") of the manual pages.

15 years agodoc/Platforms.txt: added x86_64/unknown/linux-gnu
Alexander Barton [Fri, 5 Dec 2008 21:35:23 +0000 (22:35 +0100)]
doc/Platforms.txt: added x86_64/unknown/linux-gnu

15 years agodoc/Platforms.txt: update list of tested platforms.
Alexander Barton [Fri, 5 Dec 2008 17:11:50 +0000 (18:11 +0100)]
doc/Platforms.txt: update list of tested platforms.

15 years agodoc/SSL.txt: enhance documentation.
Alexander Barton [Thu, 4 Dec 2008 12:20:38 +0000 (13:20 +0100)]
doc/SSL.txt: enhance documentation.

15 years agodoc/Services.txt: explain which IRC Services versions are compatible
Alexander Barton [Thu, 4 Dec 2008 10:14:26 +0000 (11:14 +0100)]
doc/Services.txt: explain which IRC Services versions are compatible

15 years agoTestsuite start-server.sh: return correct exit code.
Alexander Barton [Wed, 3 Dec 2008 15:49:55 +0000 (16:49 +0100)]
Testsuite start-server.sh: return correct exit code.

src/testsuite/start-server.sh returns 0 when no errors occurred and the
daemon has been startet and 1 on errors. Always returning 0 is wrong ...

15 years agoMake testsuite (getpid.sh) work on OpenSolaris (i386/pc/solaris2.11).
Alexander Barton [Wed, 3 Dec 2008 15:49:17 +0000 (16:49 +0100)]
Make testsuite (getpid.sh) work on OpenSolaris (i386/pc/solaris2.11).

15 years agodoc/Services.txt: document using ngIRCd with IRC Services.
Alexander Barton [Tue, 2 Dec 2008 14:41:57 +0000 (15:41 +0100)]
doc/Services.txt: document using ngIRCd with IRC Services.

15 years agosample-ngircd.conf: remove now unused CVS "$Id$"
Alexander Barton [Sat, 22 Nov 2008 13:47:01 +0000 (14:47 +0100)]
sample-ngircd.conf: remove now unused CVS "$Id$"

15 years agongIRCd release 13~rc1 rel-13-rc1
Alexander Barton [Fri, 21 Nov 2008 21:08:23 +0000 (22:08 +0100)]
ngIRCd release 13~rc1

15 years agoFix double minus signs in manual pages
Alexander Barton [Fri, 21 Nov 2008 20:31:29 +0000 (21:31 +0100)]
Fix double minus signs in manual pages

This patch fixes the following lintian(1) warning: "Manual page seems
to contain a hyphen where a minus sign was intended. '-' chars are
interpreted as hyphens (U+2010) by groff, not as minus signs (U+002D).
Since options to programs use minus signs (U+002D), this means for
example in UTF-8 locales that you cannot cut&paste options, nor search
for them easily. '-' must be escaped ('\-') to be interpreted as minus."

15 years agoDebian package ("make deb"): fix some lintian(1) warnings
Alexander Barton [Fri, 21 Nov 2008 20:27:23 +0000 (21:27 +0100)]
Debian package ("make deb"): fix some lintian(1) warnings

15 years agoChange formatting of some log messages
Alexander Barton [Thu, 20 Nov 2008 22:50:26 +0000 (23:50 +0100)]
Change formatting of some log messages

- Fix formatting of some log messages, mostly punctuation.
- cb_Connect_to_Server(): don't use string concatenation, because it
  is not supported by pre-ANSI C compilers ...

15 years agoFix pem_passwd_cb(): unused variable "rwflag" (OpenSSL)
Alexander Barton [Thu, 20 Nov 2008 22:46:20 +0000 (23:46 +0100)]
Fix pem_passwd_cb(): unused variable "rwflag" (OpenSSL)

This patch fixes the following warning of GCC (version 4.3.2) in
function pem_passwd_cb() when compiling with OpenSSL support and
without debug code:

conn-ssl.c: In function 'pem_passwd_cb':
conn-ssl.c:122: warning: unused parameter 'rwflag'

15 years agoNew configuration option "NoIdent" to disable IDENT lookups
Alexander Barton [Wed, 19 Nov 2008 18:11:39 +0000 (19:11 +0100)]
New configuration option "NoIdent" to disable IDENT lookups

The new configuration option "NoIdent" in ngircd.conf can be used to
disable IDENT lookups even when the ngIRCd daemon is compiled with IDENT
lookups enabled.

15 years agoImplement the IRC command "SERVLIST"
Alexander Barton [Wed, 19 Nov 2008 17:13:03 +0000 (18:13 +0100)]
Implement the IRC command "SERVLIST"

The IRC command "SERVLIST" lists all the registered services, see RFC 2811, section 3.5.1.
The syntax is "SERVLIST [<mask> [<type>]]". The parameter <type> is not used by ngIRCd at
the moment, all registered services are of type 0 (which is the default when omitted).

15 years agoUpdated NEWS and ChangeLog, using NEWS for news only :-)
Alexander Barton [Wed, 19 Nov 2008 10:46:37 +0000 (11:46 +0100)]
Updated NEWS and ChangeLog, using NEWS for news only :-)

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.