ngircd-alex.git
6 years agoUpdated NEWS and ChangeLog files
Alexander Barton [Tue, 4 Jun 2013 09:42:25 +0000 (11:42 +0200)]
Updated NEWS and ChangeLog files

6 years agoEnhance Travis-CI configuration file
Alexander Barton [Tue, 4 Jun 2013 09:35:54 +0000 (11:35 +0200)]
Enhance Travis-CI configuration file

It now configures the sandbox to build ngIRCd with IPv6, IDENT, PAM,
TCP-Wrappers, and zlib support. And it installs expect(1) and telnet(1)
for the test suite.

6 years agoMerge pull request #3 from Cofyc/master
Alexander Barton [Thu, 30 May 2013 15:55:48 +0000 (08:55 -0700)]
Merge pull request #3 from Cofyc/master

irc-info.c: some commands use LINE_LEN as command buffer len

6 years agoLINE_LEN -> COMMAND_LEN
Yecheng Fu [Thu, 30 May 2013 05:53:33 +0000 (13:53 +0800)]
LINE_LEN -> COMMAND_LEN
LINE_LEN is configuration file line length

6 years agoIncludeDir: default to "$SYSCONFDIR/ngircd.conf.d" bug157-IncludeDir
Alexander Barton [Fri, 24 May 2013 22:25:38 +0000 (00:25 +0200)]
IncludeDir: default to "$SYSCONFDIR/ngircd.conf.d"

Now "IncludeDir" defaults to "$SYSCONFDIR/ngircd.conf.d" instead
of no directory, but a missing directory is only reported as an
error if it has explicitely configured in the main configuration
file and simply ignored otherwise.

Therefore it is now possible not to touch the default (sample)
configuration file at all, and set all distribution and/or system
specific configuration options in "*.conf" files stored in
"$SYSCONFDIF/ngircd.conf.d/".

Thanks to "Elmasloco" for the idea!

6 years ago"IncludeDir" can't be overwritten by included files
Alexander Barton [Fri, 24 May 2013 20:40:23 +0000 (22:40 +0200)]
"IncludeDir" can't be overwritten by included files

6 years agoImplement new configuration option "IncludeDir"
Alexander Barton [Fri, 24 May 2013 20:29:41 +0000 (22:29 +0200)]
Implement new configuration option "IncludeDir"

The option "IncludeDir" in the [Options] section can be used
to specify a directory which can contain further configuration
files and configuration file snippets matching the pattern
"*.conf" that should be read in after the main configuration
file ("ngircd.conf" by default) has been parsed.

Closes bug #157.

6 years agoconf.c: New function Read_Config_File()
Alexander Barton [Fri, 24 May 2013 19:57:42 +0000 (21:57 +0200)]
conf.c: New function Read_Config_File()

This function reads in and parses a single configuration file.
Adjust all other functions to display the correct name of the
file being read in currently.

6 years agoRename "Mask" variables into "Pattern" in assert() statements
Alexander Barton [Sun, 21 Apr 2013 13:57:51 +0000 (15:57 +0200)]
Rename "Mask" variables into "Pattern" in assert() statements

This completes commit 3ab00e3a11 which broke debug builds.

6 years agoEnsure there is enough space for the mask
Federico G. Schwindt [Sat, 20 Apr 2013 09:53:16 +0000 (10:53 +0100)]
Ensure there is enough space for the mask

As pointed by Alex while strl{cat,cpy} take the full length
we need to leave space to ensure a proper mask is always created
so revert the removal of - N from my last change.

6 years agoBetter description for Lists_CheckReason()
Federico G. Schwindt [Fri, 19 Apr 2013 22:51:42 +0000 (23:51 +0100)]
Better description for Lists_CheckReason()

6 years agoChange Lists_MakeMask() to receive a buffer for the mask
Federico G. Schwindt [Fri, 19 Apr 2013 23:19:03 +0000 (00:19 +0100)]
Change Lists_MakeMask() to receive a buffer for the mask

Change callers accordingly so they don't rely on a global buffer and
rename Mask to Pattern where it makes sense since some functions
where indeed receiving a pattern and not a mask.

6 years agoFix use-after-free on Lists_CheckReason()
Federico G. Schwindt [Fri, 19 Apr 2013 22:51:42 +0000 (23:51 +0100)]
Fix use-after-free on Lists_CheckReason()

Change Lists_CheckReason() to receive a buffer where the reason
will be stored and its length.  Change callers accordingly.

Change Class_GetMemberReason() (and its callers) in a similar way
so it doesn't rely on a global buffer for the rejected reason.

6 years agoUpdate doc/Platforms.txt a little bit ...
Alexander Barton [Mon, 1 Apr 2013 15:23:49 +0000 (17:23 +0200)]
Update doc/Platforms.txt a little bit ...

6 years agoBuild OS X package with correct file permissions
Alexander Barton [Wed, 27 Mar 2013 12:09:23 +0000 (13:09 +0100)]
Build OS X package with correct file permissions

This requires to have the correct permissions in the source tree, which
is "root:wheel", which in turn requires root privileges. Therefore the
Makefile now tries to become root on "make osxpkg-dest" but tries hard
not to require root privileges on "clean" etc.

6 years agoXcode: fix detection of host OS, vendor, and CPU
Alexander Barton [Wed, 27 Mar 2013 11:47:12 +0000 (12:47 +0100)]
Xcode: fix detection of host OS, vendor, and CPU

6 years agoPackageMaker: use relativ path names
Alexander Barton [Wed, 27 Mar 2013 11:45:30 +0000 (12:45 +0100)]
PackageMaker: use relativ path names

6 years agoAdd Travis-CI configuration file
Alexander Barton [Mon, 25 Mar 2013 14:24:47 +0000 (15:24 +0100)]
Add Travis-CI configuration file

6 years agoMake configure[.ng] compatible with autoconf 1.10 again
Alexander Barton [Mon, 18 Mar 2013 11:45:32 +0000 (12:45 +0100)]
Make configure[.ng] compatible with autoconf 1.10 again

The incompatibility has been introduced by commit d0c9f4a6,
"configure: search for iconv_open as well as libiconv_open".

6 years agoLists_CheckReason(): Check for Client_MaskCloaked()
Sebastian Köhler [Wed, 20 Mar 2013 02:40:31 +0000 (03:40 +0100)]
Lists_CheckReason(): Check for Client_MaskCloaked()

Look for possible cloaked Masks in Lists. Users with +x usermode can be
banned with their cloaked hostname now.

6 years agoServices.txt: Anope 1.9.8 has been released now
Alexander Barton [Wed, 13 Mar 2013 21:08:16 +0000 (22:08 +0100)]
Services.txt: Anope 1.9.8 has been released now

6 years agoCommands.txt: Update description of the "KILL" command
Alexander Barton [Sat, 9 Mar 2013 17:00:49 +0000 (18:00 +0100)]
Commands.txt: Update description of the "KILL" command

6 years agoConn_Handler(): Don't test for penalty times
Alexander Barton [Sat, 9 Mar 2013 16:58:10 +0000 (17:58 +0100)]
Conn_Handler(): Don't test for penalty times

The Conn_Handler() main loop calls Handle_Buffer() which checks for the
"penalty time" of each client itself, so don't do it twice.

6 years agoDon't read SSL client data before DNS resolver is finished
Alexander Barton [Sat, 9 Mar 2013 16:44:34 +0000 (17:44 +0100)]
Don't read SSL client data before DNS resolver is finished

Fix the cb_clientserver_ssl() callback function to not read in and store SSL
encrypted client data before the asynchronous DNS resolver sub-process has
finished: This could have resulted in discarding the resolved client hostname
and IDENT reply afterwards, because in some situations (timing dependent) the
NICK and USER commands could have already been read in from the client,
stored in the buffer, and been processed.

Thanks to Julian Brost for reporting the issue and testing, and to Federico
G. Schwindt <fgsch@lodoss.net> for helping to debug it!

6 years agoIncrease password length limit to 64 characters
Alexander Barton [Fri, 8 Mar 2013 18:31:57 +0000 (19:31 +0100)]
Increase password length limit to 64 characters

Closes bug #154.

6 years agodoc/Services.txt: Update Anope status and URL
Alexander Barton [Tue, 26 Feb 2013 08:38:27 +0000 (09:38 +0100)]
doc/Services.txt: Update Anope status and URL

6 years agoCommands.txt: Update description of the "KICK" command
Alexander Barton [Sun, 24 Feb 2013 17:53:33 +0000 (18:53 +0100)]
Commands.txt: Update description of the "KICK" command

6 years agoCommands.txt: Update description of the "INVITE" command
Alexander Barton [Sun, 24 Feb 2013 17:53:10 +0000 (18:53 +0100)]
Commands.txt: Update description of the "INVITE" command

6 years agoirc-op.c: use irc-macros.h
Alexander Barton [Sun, 24 Feb 2013 17:51:54 +0000 (18:51 +0100)]
irc-op.c: use irc-macros.h

6 years agoirc-cap.c: use irc-macros.h
Alexander Barton [Sun, 24 Feb 2013 17:51:43 +0000 (18:51 +0100)]
irc-cap.c: use irc-macros.h

6 years agoirc-op.c: Update source code documentation
Alexander Barton [Sun, 24 Feb 2013 17:50:12 +0000 (18:50 +0100)]
irc-op.c: Update source code documentation

6 years agoirc-cap.c: Update source code documentation
Alexander Barton [Sun, 24 Feb 2013 17:49:07 +0000 (18:49 +0100)]
irc-cap.c: Update source code documentation

6 years agoAdd new _IRC_ARGC_EQ_OR_RETURN_ macro to irc-macros.h
Alexander Barton [Sun, 24 Feb 2013 15:20:27 +0000 (16:20 +0100)]
Add new _IRC_ARGC_EQ_OR_RETURN_ macro to irc-macros.h

6 years agoAdd new _IRC_ARGC_BETWEEN_OR_RETURN_ macro to irc-macros.h
Alexander Barton [Sun, 24 Feb 2013 15:14:13 +0000 (16:14 +0100)]
Add new _IRC_ARGC_BETWEEN_OR_RETURN_ macro to irc-macros.h

6 years agoirc-cap.c: move static functions to the top of the file
Alexander Barton [Sun, 24 Feb 2013 15:08:17 +0000 (16:08 +0100)]
irc-cap.c: move static functions to the top of the file

And remove now unnecessary (local) prototypes.

6 years agoUpdate Doxygen configuration
Alexander Barton [Fri, 22 Feb 2013 17:11:26 +0000 (18:11 +0100)]
Update Doxygen configuration

6 years agoClean up Xcode project file, remove outdated files, add missing
Alexander Barton [Fri, 15 Feb 2013 21:54:36 +0000 (22:54 +0100)]
Clean up Xcode project file, remove outdated files, add missing

6 years agosrc/testsuite/README: add whois-test.e
Alexander Barton [Fri, 15 Feb 2013 21:54:32 +0000 (22:54 +0100)]
src/testsuite/README: add whois-test.e

6 years agoirc-login.c: conenction -> connection
Alexander Barton [Fri, 22 Feb 2013 14:15:22 +0000 (15:15 +0100)]
irc-login.c: conenction -> connection

Introduced by commit d3ef2239 as of Sun Jan 16 2011 ...
Thanks to Patrik Schindler <poc@pocnet.net> for reporting this!

6 years agoMerge branch 'bug151-iconv' into master
Alexander Barton [Fri, 15 Feb 2013 20:59:28 +0000 (21:59 +0100)]
Merge branch 'bug151-iconv' into master

* bug151-iconv:
  configure: search for iconv_open as well as libiconv_open

6 years agoMerge branch 'bug153-ServerMask' into master
Alexander Barton [Fri, 15 Feb 2013 20:59:06 +0000 (21:59 +0100)]
Merge branch 'bug153-ServerMask' into master

* bug153-ServerMask:
  Update irc-info.c to use irc-macros.h
  Add new irc-macros.h to project
  irc-info.c: add/streamline function documentation comments
  irc-info: move static functions at the top of the file
  Implement new function Client_SearchServer()

Conflicts:
src/ngircd/irc-info.c

6 years agoconfigure: search for iconv_open as well as libiconv_open
Alexander Barton [Fri, 15 Feb 2013 20:32:08 +0000 (21:32 +0100)]
configure: search for iconv_open as well as libiconv_open

On some installations iconv_open() is actually libiconv_open().
iconv_open() is the glibc version while libiconv_open() is the libiconv
version. This patch enables ngIRCd to detect both cases.

Tested on OpenBSD 5.1.

Closes bug #151.

6 years agoconfigure: conversation -> conversion
Alexander Barton [Fri, 15 Feb 2013 20:26:47 +0000 (21:26 +0100)]
configure: conversation -> conversion

6 years agongIRCd Release 20.2
Alexander Barton [Fri, 15 Feb 2013 11:18:02 +0000 (12:18 +0100)]
ngIRCd Release 20.2

(cherry picked from commit c45d9dd1f08fddb95fa01d62c69848cd753a3161)

6 years agoKICK: Fix denial of service bug
Sebastian Köhler [Thu, 14 Feb 2013 18:21:01 +0000 (19:21 +0100)]
KICK: Fix denial of service bug

Test if the user that it is to be kicked is on the channel before user
channel modes are tested. Otherwise assert( cl2chan != NULL ); in
line 742 would fail and stop the service.

6 years agosighandlers.c: Update some log messages
Alexander Barton [Tue, 12 Feb 2013 23:26:16 +0000 (00:26 +0100)]
sighandlers.c: Update some log messages

6 years agomy_sd_listen_fds(): really return an "int"
Alexander Barton [Mon, 11 Feb 2013 22:25:13 +0000 (23:25 +0100)]
my_sd_listen_fds(): really return an "int"

This fixes the following warning using Apple LLVM version 4.2
(clang-425.0.24) on OS X:

  src/ngircd/conn.c:157:9: Implicit conversion loses integer
                           precision: 'long' to 'int'

6 years agoMerge branch 'bug155-allowAtInUser'
Alexander Barton [Mon, 11 Feb 2013 12:58:30 +0000 (13:58 +0100)]
Merge branch 'bug155-allowAtInUser'

* bug155-allowAtInUser:
  Allow "@" character in user names for authentication

6 years agoAllow "@" character in user names for authentication bug155-allowAtInUser
Alexander Barton [Mon, 11 Feb 2013 12:57:54 +0000 (13:57 +0100)]
Allow "@" character in user names for authentication

The "@" character isn't allowed in IRC usernames, because it is the
separator between user name and hostname in IRC masks:

  <nickname>!<username>@<hostname>

This patch accepts user names including "@" characters, saves the
unmodified name for authentication but stores only the part in front
of the "@" character as "IRC user name". And the latter is how
ircd2.11, Bahamut, and irc-seven behave as well.

Closes bug #155.

6 years agoMerge branch 'systemd'
Alexander Barton [Sun, 10 Feb 2013 19:43:56 +0000 (20:43 +0100)]
Merge branch 'systemd'

* systemd:
  ngircd.sock: explicitely bind to IPv4 and IPv6 addresses
  Show address and port of sockets passed-in by systemd(8)
  Check type of sockets passed-in by systemd(8)
  Adjust severity levels of some log messages
  New configuration option "IdleTimeout": exit daemon when idle
  Implement support for systemd(8) "socket activation"
  contrib/README: add more files

6 years agongircd.sock: explicitely bind to IPv4 and IPv6 addresses systemd
Alexander Barton [Sun, 10 Feb 2013 19:37:55 +0000 (20:37 +0100)]
ngircd.sock: explicitely bind to IPv4 and IPv6 addresses

6 years agoShow address and port of sockets passed-in by systemd(8)
Alexander Barton [Sun, 10 Feb 2013 19:21:35 +0000 (20:21 +0100)]
Show address and port of sockets passed-in by systemd(8)

6 years agoCheck type of sockets passed-in by systemd(8)
Alexander Barton [Sun, 10 Feb 2013 19:20:58 +0000 (20:20 +0100)]
Check type of sockets passed-in by systemd(8)

This patch makes sure that ngIRCd doesn't try to handle sockets of
unsupported types, for example of AF_INET6 sockets when ngIRCd isn't
compiled with support for IPv6 ...

6 years agoAdjust severity levels of some log messages
Alexander Barton [Sun, 10 Feb 2013 19:18:44 +0000 (20:18 +0100)]
Adjust severity levels of some log messages

6 years agoCommands.txt: spelling fixes ...
Alexander Barton [Sat, 9 Feb 2013 23:35:03 +0000 (00:35 +0100)]
Commands.txt: spelling fixes ...

6 years agoMerge branch 'HelpText'
Alexander Barton [Sat, 9 Feb 2013 23:29:30 +0000 (00:29 +0100)]
Merge branch 'HelpText'

* HelpText: (22 commits)
  Commands.txt: Update description of the "USERS" command
  Commands.txt: Update description of the "SUMMON" command
  Commands.txt: Update description of the "SERVLIST" command
  Commands.txt: Update description of the "WHOWAS" command
  Commands.txt: Update description of the "WHOIS" command
  Commands.txt: Update description of the "WHO" command
  Commands.txt: Update description of the "VERSION" command
  Commands.txt: Update description of the "USERHOST" command
  Commands.txt: Update description of the "TIME" command
  Commands.txt: Update description of the "STATS" command
  Commands.txt: Update description of the "NAMES" command
  Commands.txt: Update description of the "MOTD" command
  Commands.txt: Update description of the "LUSERS" command
  Commands.txt: Update description of the "LINKS" command
  Commands.txt: Update description of the "ISON" command
  Commands.txt: Update description of the "INFO" command
  Commands.txt: Update description of the "ADMIN" command
  Commands.txt: Add description for the "CHARCONV" command
  Commands.txt: Add description for the "CAP" command
  Commands.txt: Import descriptions from "rbose/command_help"
  ...

6 years agoCommands.txt: Update description of the "USERS" command HelpText
Alexander Barton [Sat, 9 Feb 2013 23:25:19 +0000 (00:25 +0100)]
Commands.txt: Update description of the "USERS" command

6 years agoCommands.txt: Update description of the "SUMMON" command
Alexander Barton [Sat, 9 Feb 2013 23:25:09 +0000 (00:25 +0100)]
Commands.txt: Update description of the "SUMMON" command

6 years agoCommands.txt: Update description of the "SERVLIST" command
Alexander Barton [Sat, 9 Feb 2013 23:24:52 +0000 (00:24 +0100)]
Commands.txt: Update description of the "SERVLIST" command

6 years agoCommands.txt: Update description of the "WHOWAS" command
Alexander Barton [Sat, 9 Feb 2013 23:24:34 +0000 (00:24 +0100)]
Commands.txt: Update description of the "WHOWAS" command

6 years agoCommands.txt: Update description of the "WHOIS" command
Alexander Barton [Sat, 9 Feb 2013 23:24:14 +0000 (00:24 +0100)]
Commands.txt: Update description of the "WHOIS" command

6 years agoCommands.txt: Update description of the "WHO" command
Alexander Barton [Sat, 9 Feb 2013 23:23:59 +0000 (00:23 +0100)]
Commands.txt: Update description of the "WHO" command

6 years agoCommands.txt: Update description of the "VERSION" command
Alexander Barton [Sat, 9 Feb 2013 23:23:43 +0000 (00:23 +0100)]
Commands.txt: Update description of the "VERSION" command

6 years agoCommands.txt: Update description of the "USERHOST" command
Alexander Barton [Sat, 9 Feb 2013 23:23:27 +0000 (00:23 +0100)]
Commands.txt: Update description of the "USERHOST" command

6 years agoCommands.txt: Update description of the "TIME" command
Alexander Barton [Sat, 9 Feb 2013 23:23:10 +0000 (00:23 +0100)]
Commands.txt: Update description of the "TIME" command

6 years agoCommands.txt: Update description of the "STATS" command
Alexander Barton [Sat, 9 Feb 2013 23:22:50 +0000 (00:22 +0100)]
Commands.txt: Update description of the "STATS" command

6 years agoCommands.txt: Update description of the "NAMES" command
Alexander Barton [Sat, 9 Feb 2013 23:22:24 +0000 (00:22 +0100)]
Commands.txt: Update description of the "NAMES" command

6 years agoCommands.txt: Update description of the "MOTD" command
Alexander Barton [Sat, 9 Feb 2013 23:20:41 +0000 (00:20 +0100)]
Commands.txt: Update description of the "MOTD" command

6 years agoCommands.txt: Update description of the "LUSERS" command
Alexander Barton [Sat, 9 Feb 2013 23:20:19 +0000 (00:20 +0100)]
Commands.txt: Update description of the "LUSERS" command

6 years agoCommands.txt: Update description of the "LINKS" command
Alexander Barton [Sat, 9 Feb 2013 23:19:59 +0000 (00:19 +0100)]
Commands.txt: Update description of the "LINKS" command

6 years agoCommands.txt: Update description of the "ISON" command
Alexander Barton [Sat, 9 Feb 2013 23:19:41 +0000 (00:19 +0100)]
Commands.txt: Update description of the "ISON" command

6 years agoCommands.txt: Update description of the "INFO" command
Alexander Barton [Sat, 9 Feb 2013 23:19:20 +0000 (00:19 +0100)]
Commands.txt: Update description of the "INFO" command

6 years agoCommands.txt: Update description of the "ADMIN" command
Alexander Barton [Sat, 9 Feb 2013 23:18:36 +0000 (00:18 +0100)]
Commands.txt: Update description of the "ADMIN" command

6 years agoUpdate irc-info.c to use irc-macros.h bug153-ServerMask
Alexander Barton [Sat, 9 Feb 2013 22:58:11 +0000 (23:58 +0100)]
Update irc-info.c to use irc-macros.h

This includes:

 - move IRC_SetPenalty() at the beginning of the handler functions,
 - use macros provided by irc-macros.h,
 - code cleanup.

The main benefits of this patch are core size reduction, streamlined
structure of the handler functions, and enhanced functionality:
because of the _IRC_GET_TARGET_SERVER_OR_RETURN_() macro using the
Client_SearchServer() function, the target of the specific IRC command
can now be given server names, server mask, or the nickname of a user
connected to the server.

Closes bug #153.

6 years agoAdd new irc-macros.h to project
Alexander Barton [Sat, 9 Feb 2013 22:55:42 +0000 (23:55 +0100)]
Add new irc-macros.h to project

This file prvides some macros for common tasks required by functions
implementing handlers for IRC commands:

 * _IRC_ARGC_LE_OR_RETURN_
 * _IRC_ARGC_GE_OR_RETURN_
 * _IRC_GET_SENDER_OR_RETURN_
 * _IRC_GET_TARGET_SERVER_OR_RETURN_

6 years agoirc-info.c: add/streamline function documentation comments
Alexander Barton [Sat, 9 Feb 2013 22:33:29 +0000 (23:33 +0100)]
irc-info.c: add/streamline function documentation comments

Add missing comments, streamline wording, and remove references to the
RFCs: this will be added to ./doc/Commands.txt with an other patch and
we want to avoid redundancy ...

6 years agoirc-info: move static functions at the top of the file
Alexander Barton [Sat, 9 Feb 2013 22:18:49 +0000 (23:18 +0100)]
irc-info: move static functions at the top of the file

6 years ago"WHO <hostmask>": use displayed hostname for matching
Alexander Barton [Fri, 8 Feb 2013 16:18:43 +0000 (17:18 +0100)]
"WHO <hostmask>": use displayed hostname for matching

Use the currently "displayed hostname" (which can be cloaked!) for
hostname matching, not the real one. In other words: don't display
all the cloaked users on a specific real hostname!

Thanks to DNS <dns@rbose.org> for reporting this issue.

6 years agoImplement new function Client_SearchServer()
Alexander Barton [Tue, 5 Feb 2013 12:04:11 +0000 (13:04 +0100)]
Implement new function Client_SearchServer()

This function returns the server structure of a client or a given "mask";
it is useful for implemention handlers for commands like "COMMAND *.net",
which should work on a server matching "*.net".

Please note that the local server is always returned when it matches the
mask, but besides that, the order is completely arbitrary.

6 years agoNew configuration option "IdleTimeout": exit daemon when idle
Alexander Barton [Mon, 4 Feb 2013 22:15:53 +0000 (23:15 +0100)]
New configuration option "IdleTimeout": exit daemon when idle

This patch implements a new configuration option "IdleTimeout" in the
[Limits] section of the configuration file which can be used to set a
timeout (in seconds) after which the whole daemon will shutdown when no
more connections are left active after handling at least one client.

The default is 0, "never".

This can be useful for testing or when ngIRCd is started using "socket
activation" with systemd(8), for example.

6 years agoImplement support for systemd(8) "socket activation"
Alexander Barton [Mon, 4 Feb 2013 20:46:20 +0000 (21:46 +0100)]
Implement support for systemd(8) "socket activation"

This patch enables ngIRCd to work with listening sockets already
initialized and passed-in by systemd(8) and hereby to support on-demand
"socket activation".

systemd(8) uses two environment variables to pass information about the
sockets to ngIRCd, LISTEN_PID and LISTEN_FDS, and this mechanism only
kicks in when both variables are set. In all other cases, and therefore
in most installations out there, nothing changes at all.

Please note:
If socket activation is in effect, ngIRCd will not initialize any (other)
soeckets on its own! All sockets must be configured in the systemd(8)
socket unit configuration file in this case, see ./contrib/ngircd.socket
for example.

Probably it would be interesting to match passed-in sockets to configured
listening sockets and to initialize all the remaining ones not already
set up by systemd(8), but this is kept back for an other patch ...

See
 - <http://0pointer.de/blog/projects/socket-activation.html>
 - <http://0pointer.de/blog/projects/socket-activation2.html>
 - <http://www.freedesktop.org/software/systemd/man/systemd.socket.html>

6 years agocontrib/README: add more files
Alexander Barton [Mon, 4 Feb 2013 20:31:42 +0000 (21:31 +0100)]
contrib/README: add more files

6 years agoRename ports_initlisteners() to Init_Listeners()
Alexander Barton [Sun, 27 Jan 2013 20:10:50 +0000 (21:10 +0100)]
Rename ports_initlisteners() to Init_Listeners()

6 years agoNewListener(): Code cleanup
Alexander Barton [Sun, 27 Jan 2013 19:57:25 +0000 (20:57 +0100)]
NewListener(): Code cleanup

6 years agoEnable WHOIS to display information about IRC Services
Alexander Barton [Sun, 3 Feb 2013 20:32:53 +0000 (21:32 +0100)]
Enable WHOIS to display information about IRC Services

This patch introduces the new numeric 310(RPL_WHOISSERVICE) and enables
WHOIS to display information about IRC services. This numeric is used
for this purpose by InspIRCd, for example -- but as usual, other numerics
are in use, too, like 613 in UltimateIRCd ...

Please note that neither the Operator (+o) not the "bot status" (+B)
of an IRC service id displayed in the output.

Change suggested by Federico G. Schwindt <fgsch@lodoss.net>, Thanks.

6 years agoCommands.txt: Add description for the "CHARCONV" command
Alexander Barton [Sun, 3 Feb 2013 18:02:42 +0000 (19:02 +0100)]
Commands.txt: Add description for the "CHARCONV" command

6 years agoCommands.txt: Add description for the "CAP" command
Alexander Barton [Sun, 3 Feb 2013 17:59:44 +0000 (18:59 +0100)]
Commands.txt: Add description for the "CAP" command

6 years agoExit message: use singular & plural :-)
Alexander Barton [Sun, 27 Jan 2013 22:22:00 +0000 (23:22 +0100)]
Exit message: use singular & plural :-)

6 years agoautogen.sh: Check for autoconf/automake wrapper scripts
Alexander Barton [Sun, 27 Jan 2013 11:54:48 +0000 (12:54 +0100)]
autogen.sh: Check for autoconf/automake wrapper scripts

For example OpenBSD uses a "autoconf" and "automake" wrapper script which
tells the user to set AUTOCONF_VERSION and AUTOMAKE_VERSION environment
variables. This patch enhances autogen.sh to not detect these wrapper
scripts as regular autoconf/automake commands but to set the required
environment variables after detecting the real "command-X.Y" commands.

Tested on OpenBSD 5.1.

6 years agoautogen.sh: Don't use "egrep -o", use "sed"
Alexander Barton [Sun, 27 Jan 2013 11:25:58 +0000 (12:25 +0100)]
autogen.sh: Don't use "egrep -o", use "sed"

"egrep -o" isn't portable and not available on OpenBSD, for example. So
let's use sed instead to get the automake version. The expression used
now is less specific but should work as well ...

6 years agoIRC_WHO_Channel(): Use strlcpy() instead of strcpy()
Alexander Barton [Sun, 27 Jan 2013 00:00:32 +0000 (01:00 +0100)]
IRC_WHO_Channel(): Use strlcpy() instead of strcpy()

This fixes the following warning, at least on OpenBSD 4.8:

 irc-info.o(.text+0x2427): In function `IRC_WHO':
 src/ngircd/irc-info.c:896: warning: strcpy() is almost always misused,
                            please use strlcpy()

6 years agoStreamline punctuation of log messages
Alexander Barton [Sat, 26 Jan 2013 15:52:41 +0000 (16:52 +0100)]
Streamline punctuation of log messages

Make sure that all log messages end with a correct punctuation mark.

The rules for formatting log messages are:

 1. Add punctuation marks to all messages passed to the actual logging
    functions like Log() and LogDebug().
 2. Don't add any punctuation marks to messages that are stored in
    variables for later use or are passed over the network.
 3. IP addresses, DNS host names and IRC server names should be quoted.
 4. Messages originating in the network should be quoted (at least if
    they are "untrusted" or variable).

Most probably this patch doesn't fix all mistakes, but it should be a
good starting point ...

6 years agoconfigure: "netinet/in_systm.h" is optional
Alexander Barton [Thu, 24 Jan 2013 21:45:00 +0000 (22:45 +0100)]
configure: "netinet/in_systm.h" is optional

The header file "netinet/in_systm.h" already is optional in ngIRCd, so
don't require it in the configure script. Now ngIRCd can be built on
Minix 3 again :-)

6 years agocontrib/Debian/rules: Do no compress Commands.txt
DNS [Tue, 22 Jan 2013 20:36:03 +0000 (21:36 +0100)]
contrib/Debian/rules: Do no compress Commands.txt

This is required, because ngIRCd can't use a compressed file as
help text ...

(cherry picked from commit 6d09b4f366f656f6d2732ea96a653e086380e458)

6 years agoAUTHORS: Update list of contributors
Alexander Barton [Wed, 23 Jan 2013 18:45:00 +0000 (19:45 +0100)]
AUTHORS: Update list of contributors

6 years agoAUTHORS: Use "email address syntax"
Alexander Barton [Wed, 23 Jan 2013 18:41:52 +0000 (19:41 +0100)]
AUTHORS: Use "email address syntax"

6 years agoCommands.txt: Import descriptions from "rbose/command_help"
Alexander Barton [Wed, 23 Jan 2013 14:16:33 +0000 (15:16 +0100)]
Commands.txt: Import descriptions from "rbose/command_help"

Import command description texts from the "rbose/command_help" branch,
which have been written by DNS <dns@rbose.org> -- thanks a lot!

6 years agoCommands.txt: Reorder some commands
Alexander Barton [Wed, 23 Jan 2013 14:02:46 +0000 (15:02 +0100)]
Commands.txt: Reorder some commands

Reorder some commands and introduce new section "Connection Handling".
Idea by DNS <dns@rbose.org>, thanks!

6 years agoCommands.txt: Fix some wording and spelling
Alexander Barton [Wed, 23 Jan 2013 13:51:19 +0000 (14:51 +0100)]
Commands.txt: Fix some wording and spelling

6 years agongircd.service: Use "forking" service type
Alexander Barton [Tue, 22 Jan 2013 23:41:02 +0000 (00:41 +0100)]
ngircd.service: Use "forking" service type

Don't run ngIRCd in forground mode but let it daemonize itself. This
enhances the log output of "systemctl status ngircd.service", because
now ngIRCd doesn't print out its PID and timestamp on each log message
which is redundant: it becomes logged by systemd/journald already.