Browse Source

Import upstream version 21

Alexander Barton 8 years ago
parent
commit
95204d08e8
100 changed files with 5543 additions and 3215 deletions
  1. 28 16
      AUTHORS
  2. 157 2
      ChangeLog
  3. 12 1
      INSTALL
  4. 11 7
      Makefile.am
  5. 11 7
      Makefile.in
  6. 85 1
      NEWS
  7. 22 7
      autogen.sh
  8. 82 16
      configure
  9. 16 10
      configure.ac
  10. 16 10
      configure.ng
  11. 31 0
      contrib/Debian/changelog
  12. 0 2
      contrib/Debian/ngircd.default
  13. 4 3
      contrib/Debian/ngircd.init
  14. 15 13
      contrib/Debian/rules
  15. 12 7
      contrib/MacOSX/config.h
  16. 1 1
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd-contents.xml
  17. 1 1
      contrib/MacOSX/ngIRCd.pmdoc/01ngircd.xml
  18. 2 2
      contrib/MacOSX/ngIRCd.pmdoc/index.xml
  19. 67 129
      contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
  20. 2 1
      contrib/Makefile.am
  21. 2 1
      contrib/Makefile.in
  22. 11 2
      contrib/README
  23. 2 2
      contrib/ngircd.service
  24. 11 0
      contrib/ngircd.socket
  25. 1 1
      contrib/ngircd.spec
  26. 41 18
      contrib/platformtest.sh
  27. 991 0
      doc/Commands.txt
  28. 3 1
      doc/Makefile.am
  29. 3 1
      doc/Makefile.in
  30. 12 3
      doc/PAM.txt
  31. 81 70
      doc/Platforms.txt
  32. 3 1
      doc/Protocol.txt
  33. 3 5
      doc/Services.txt
  34. 36 4
      doc/sample-ngircd.conf.tmpl
  35. 17 88
      doc/src/Doxyfile
  36. 1 1
      doc/src/footer.inc.html
  37. 8 6
      man/ngircd.8.tmpl
  38. 38 9
      man/ngircd.conf.5.tmpl
  39. 12 0
      src/config.h.in
  40. 8 0
      src/ipaddr/ng_ipaddr.h
  41. 1 0
      src/ngircd/Makefile.am
  42. 1 0
      src/ngircd/Makefile.in
  43. 1 0
      src/ngircd/Makefile.ng
  44. 71 68
      src/ngircd/channel.c
  45. 3 1
      src/ngircd/channel.h
  46. 29 30
      src/ngircd/class.c
  47. 4 3
      src/ngircd/class.h
  48. 288 100
      src/ngircd/client.c
  49. 25 17
      src/ngircd/client.h
  50. 1 0
      src/ngircd/conf-ssl.h
  51. 441 225
      src/ngircd/conf.c
  52. 13 3
      src/ngircd/conf.h
  53. 1 1
      src/ngircd/conn-encoding.c
  54. 0 8
      src/ngircd/conn-func.c
  55. 235 64
      src/ngircd/conn-ssl.c
  56. 3 0
      src/ngircd/conn-ssl.h
  57. 229 62
      src/ngircd/conn.c
  58. 4 5
      src/ngircd/conn.h
  59. 15 4
      src/ngircd/defines.h
  60. 1 1
      src/ngircd/hash.c
  61. 1 1
      src/ngircd/io.c
  62. 113 125
      src/ngircd/irc-cap.c
  63. 136 189
      src/ngircd/irc-channel.c
  64. 2 6
      src/ngircd/irc-encoding.c
  65. 730 823
      src/ngircd/irc-info.c
  66. 126 210
      src/ngircd/irc-login.c
  67. 113 0
      src/ngircd/irc-macros.h
  68. 9 9
      src/ngircd/irc-metadata.c
  69. 113 128
      src/ngircd/irc-mode.c
  70. 48 46
      src/ngircd/irc-op.c
  71. 56 80
      src/ngircd/irc-oper.c
  72. 74 43
      src/ngircd/irc-server.c
  73. 193 84
      src/ngircd/irc-write.c
  74. 6 4
      src/ngircd/irc-write.h
  75. 290 154
      src/ngircd/irc.c
  76. 4 1
      src/ngircd/irc.h
  77. 30 39
      src/ngircd/lists.c
  78. 3 2
      src/ngircd/lists.h
  79. 5 4
      src/ngircd/log.c
  80. 27 5
      src/ngircd/login.c
  81. 0 1
      src/ngircd/match.c
  82. 4 2
      src/ngircd/messages.h
  83. 38 20
      src/ngircd/ngircd.c
  84. 13 79
      src/ngircd/numeric.c
  85. 4 4
      src/ngircd/op.c
  86. 1 1
      src/ngircd/pam.c
  87. 1 1
      src/ngircd/pam.h
  88. 99 89
      src/ngircd/parse.c
  89. 2 0
      src/ngircd/parse.h
  90. 9 0
      src/ngircd/proc.c
  91. 12 16
      src/ngircd/sighandlers.c
  92. 1 1
      src/portab/Makefile.am
  93. 9 5
      src/portab/Makefile.in
  94. 1 1
      src/portab/Makefile.ng
  95. 4 0
      src/portab/portab.h
  96. 37 0
      src/portab/strndup.c
  97. 1 0
      src/testsuite/README
  98. 2 1
      src/testsuite/getpid.sh
  99. 1 0
      src/testsuite/ngircd-test1.conf
  100. 0 0
      src/testsuite/ngircd-test2.conf

+ 28 - 16
AUTHORS

@@ -18,29 +18,41 @@ Don't mail the people listed here directly, if possible!
 
 Main Authors
 ~~~~~~~~~~~~
-Alexander Barton, <alex@barton.de> (alex)
-Florian Westphal, <fw@strlen.de>
+Alexander Barton <alex@barton.de>
+Florian Westphal <fw@strlen.de>
 
 
 Contributors
 ~~~~~~~~~~~~
-Ali Shemiran, <ashemira@ucsd.edu>
-Ask Bjørn Hansen, <ask@develooper.com>
-Benjamin Pineau, <ben@zouh.org>
-Brandon Beresini, <beresini@google.com>
-Bryan Caldwell, <bcaldwel@ucsd.edu>
-Dana Dahlstrom, <dana+ngIRCd@cs.ucsd.edu>
-Eric Grunow, <egrunow@ucsd.edu>
-Goetz Hoffart, <goetz@hoffart.de>
-Ilja Osthoff, <i.osthoff@gmx.net>
-Jari Aalto, <jari.aalto@cante.net>
-Rolf Eike Beer, <eike@sf-mail.de>
-Scott Perry, <scperry@ucsd.edu>
-Sean Reifschneider, <jafo-rpms@tummy.com>
+Ali Shemiran <ashemira@ucsd.edu>
+Ask Bjørn Hansen <ask@develooper.com>
+Benjamin Pineau <ben@zouh.org>
+Brandon Beresini <beresini@google.com>
+Brett Smith <brett@w3.org>
+Brian Collins <bricollins@gmail.com>
+Bryan Caldwell <bcaldwel@ucsd.edu>
+Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
+DNS <dns@rbose.org>
+Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
+David Kingston <deathking1337@aim.com>
+Eric Grunow <egrunow@ucsd.edu>
+Federico G. Schwindt <fgsch@lodoss.net>
+Gabor Adam Toth <tg@tgbit.net>
+Goetz Hoffart <goetz@hoffart.de>
+Ilja Osthoff <i.osthoff@gmx.net>
+Jari Aalto <jari.aalto@cante.net>
+Neale Pickett <neale@woozle.org>
+Rolf Eike Beer <eike@sf-mail.de>
+Scott Perry <scperry@ucsd.edu>
+Sean Reifschneider <jafo-rpms@tummy.com>
+Sebastian Köhler <sebkoehler@whoami.org.uk>
+Tassilo Schweyer <dev@welterde.de>
+William Pitcock <nenolod@dereferenced.org>
+xor <xorboy@gmail.com>
 
 
 Code snippets
 ~~~~~~~~~~~~~
 J. Kercheval: pattern matching functions
-Patrick Powell, <papowell@astart.com>: snprintf()-function
+Patrick Powell <papowell@astart.com>: snprintf()-function
 Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions

+ 157 - 2
ChangeLog

@@ -9,6 +9,161 @@
                                -- ChangeLog --
 
 
+ngIRCd 21 (2013-10-30)
+
+  - ./contrib/Debian/ngircd.init: Make sure no stale PID file is left over
+    when (re-)starting ngIRCd.
+  - Change ./contrib/platformtest.sh and update ./doc/Platforms.txt to
+    allow usernames up to 8 characters.
+  - Call arc4random_stir() in forked subprocesses, when available. This
+    is required by FreeBSD <10 and current NetBSD at least to correctly
+    initialize the "arc4" random number generator on these platforms.
+  - Update our own Debian package configuration and fix the default path
+    of the "HelpFile" of the "full" package variants.
+
+  ngIRCd 21~rc2 (2013-10-20)
+  - Report the correct configuration file name on configuration errors,
+    support longer configuration lines, and warn when lines are truncated.
+  - Use arc4random() function to generate "random" numbers, when available.
+  - platformtest.sh: Detect clang compiler, and clean up GIT source tree
+    before building (when possible).
+  - Update (date of) manual pages.
+  - Update "Upgrade Information" in INSTALL file, add more systems to
+    doc/Platforms.txt, and fix spelling in NEWS and ChangeLog files =:)
+  - Fix remaining compiler warnings on OpenBSD.
+
+  ngIRCd 21~rc1 (2013-10-05)
+  - Actually KILL clients on GLINE/KLINE. (Closes bug #156)
+  - Adjust log messages for invalid and spoofed prefixes, which cleans up
+    logging of commands related to already KILL'ed clients. And don't
+    forward KILL commands for (already) unknown clients any more to prevent
+    unnecessary duplicates.
+  - Add support to show all user links using the "STATS L" (uppercase)
+    command (restricted to IRC Operators).
+  - Fixed blocking of server reconnects in some error configurations.
+  - Don't ignore SSL-related errors during startup any more: abort startup
+    when SSL is requested by the configuration but can't be initialized and
+    don't continue only listening on plain text communication ports.
+    (Closes bug #163)
+  - Implement configurable SSL cipher list selection for GnuTLS and OpenSSL
+    using the new configuration option "CipherList". In addition, this
+    changes the defaults to more secure values: "HIGH:!aNULL:@STRENGTH" for
+    OpenSSL, and "SECURE128" for GnuTLS.
+  - Fix "TRACE": Correctly return ERR_NEEDMOREPARAMS(461) (which basically
+    is "syntax error") when there are too many parameters.
+  - Clean up lots of permission and parameter checks in functions handling
+    IRC commands; and more consistently add penalty times on errors.
+  - Fix error numeric of WHOIS when no nick name has been provided:
+    as per RFC it should be ERR_NONICKNAMEGIVEN(431).
+  - Only log "IDENT ... no result" messages when an IDENT looked took place
+    and didn't return any data, not when IDENT has been disabled.
+  - Show connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER} messages: now
+    you can check if a server-to-server link is SSL-encrypted or not using
+    the IRC "TRACE" command.
+  - Correctly discard supplementary groups on server startup.
+  - Save client IP address text for "WebIRC" users and correctly display
+    it on WHOIS, for example. (Closes bug #159)
+  - Implement the new configuration option "DefaultUserModes" which lists
+    user modes that become automatically set on new local clients right
+    after login. Please note that only modes can be set that the client
+    could set on itself, so you can't set "a" (away) or "o" (IRC Op),
+    for example! User modes "i" (invisible) or "x" (cloaked) etc. are
+    "interesting", though. (Closes bug #160)
+  - Add support for the new METADATA "account" property, which allows
+    services to automatically identify users after netsplits and across
+    service restarts.
+  - Enforce "penalty times" on error conditions more consistently and in
+    more places. Now most error codes sent back from the IRC server to the
+    client should result in a 2 second "penalty".
+  - Implement a new configuration option "AllowedChannelTypes" that lists
+    all allowed channel types (channel prefixes) for newly created channels
+    on the local server. By default, all supported channel types are allowed.
+    If set to the empty string, local clients can't create new channels at
+    all, which equals the old "PredefChannelsOnly = yes" setting.
+    This change deprecates the "PredefChannelsOnly" variable, too, but it is
+    still supported and translated to the appropriate "AllowedChannelTypes"
+    setting. When the old "PredefChannelsOnly" variable is processed, a
+    warning message is logged. (Closes bug #152)
+  - Add support for "client certificate fingerprinting". When a client
+    passes an SSL certificate to the server, the "fingerprint" will be
+    forwarded in the network which enables IRC services to identify the
+    user using this certificate and not using passwords.
+  - IRC Operator names, as defined in ngircd.conf, are logged now when
+    handling successful OPER commands.
+  - Some error conditions while handling IRC commands, like "permission
+    denied" or "need more parameters", result in more penalty times.
+  - The numeric replies of some commands became split too early which
+    resulted in more numeric reply lines than necessary.
+  - Implement a new configuration option "IncludeDir" in the "[Options]"
+    section that can be used to specify a directory which can contain
+    further configuration files and configuration file snippets matching
+    the pattern "*.conf". These files are read in after the main server
+    configuration file ("ngircd.conf" by default) has been read in and
+    parsed.  The default is "$SYSCONFDIR/ngircd.conf.d", so that it is
+    possible to adjust the configuration only by placing additional files
+    into this directory. (Closes bug #157)
+  - Fix use-after-free in the Lists_CheckReason() function, which is used
+    to check if a client is a member of a particular ban/invite/... list.
+  - Xcode: fix detection of host OS, vendor, and CPU type, and update
+    project settings for Xcode 5.
+  - OS X PackageMaker: use relative path names in project files and package
+    with correct file permissions (requires root privileges on "make").
+  - Add Travis-CI configuration file (".travis.yml") to project.
+  - Look for possible cloaked Masks in Lists. Users with +x user mode can
+    be banned with their cloaked hostname now.
+  - Don't read SSL client data before DNS resolver is finished which 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!
+  - Increase password length limit to 64 characters. (Closes bug #154)
+  - doc/Services.txt: Update Anope status and URL.
+  - Clean up Xcode project file, remove outdated files, add missing ones.
+  - Update Doxygen configuration file.
+  - configure: search for iconv_open as well as libiconv_open, because
+    on some installations iconv_open() is actually libiconv_open().
+    iconv_open() is the glibc version while libiconv_open() is the
+    libiconv version, now both variants are supported. (Closes bug #151)
+  - ngIRCd now 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)
+  - Lots of IRC "information functions" like ADMIN, INFO, ... now accept
+    server masks and names of connected users (in addition to server names)
+    for specifying the target server of the command. (Closes bug #153)
+  - Implement 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.
+  - Implement support for systemd(8) "socket activation".
+  - contrib/README: add description for more files.
+  - Enable WHOIS to display information about IRC Services using the new
+    numeric 310(RPL_WHOISSERVICE) 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 is displayed in the output.
+  - Exit message: use singular & plural :-)
+  - autogen.sh: Check for autoconf/automake wrapper scripts
+  - Add missing punctuation marks in log messages, adjust some severity
+    levels, and make SSL-related messages more readable.
+  - AUTHORS file: Update list of contributors.
+  - Update systemd(8) example configuration files in ./contrib/ directory:
+    the "ngircd.service" file now uses the "forking" service type which
+    enhances the log messages shown by "systemctl status ngircd.service",
+    and the new "ngircd.socket" file configures a systemd socket that
+    configures a socket for ngIRCd and launches the daemon on demand.
+  - Enhance help system and the HELP command: now a "help text file" can be
+    set using the new configuration option "HelpFile" ("global" section),
+    which is read in and parsed on server startup and configuration reload,
+    and then is used to output individual help texts to specific topics.
+    Please see the file ./doc/Commands.txt for details.
+
 ngIRCd 20.3 (2013-08-23)
 
   - Security: Fix a denial of service bug (server crash) which could happen
@@ -43,7 +198,7 @@ ngIRCd 20.2 (2013-02-15)
   - autogen.sh: Enforce serial test harness on GNU automake >=1.13. The
     new parallel test harness which is enabled by default starting with
     automake 1.13 isn't compatible with our test suite.
-    And don't use "egrep -o", insetead use "sed", because it isn't portable
+    And don't use "egrep -o", instead use "sed", because it isn't portable
     and not available on OpenBSD, for example.
 
 ngIRCd 20.1 (2013-01-02)
@@ -64,7 +219,7 @@ ngIRCd 20 (2012-12-17)
 
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not
     been configured for "strict RFC mode". This is useful if you are using
-    external (PAM) authenticaion mechanisms that require longer user names.
+    external (PAM) authentication mechanisms that require longer user names.
     Patch suggested by Brett Smith <brett@w3.org>, see
     <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>.
 

+ 12 - 1
INSTALL

@@ -12,11 +12,22 @@
 I. Upgrade Information
 ~~~~~~~~~~~~~~~~~~~~~~
 
+Differences to version 20.x
+
+- Starting with ngIRCd 21, the ciphers used by SSL are configurable and
+  default to HIGH:!aNULL:@STRENGTH (OpenSSL) or SECURE128 (GnuTLS).
+  Previous version were using the OpenSSL or GnuTLS defaults, DEFAULT
+  and NORMAL respectively.
+
+- When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
+  the new mask will be KILL'ed. This was not the case with earlier versions
+  that only added the mask but didn't kill already connected users.
+
 Differences to version 19.x
 
 - Starting with ngIRCd 20, users can "cloak" their hostname only when the
   configuration variable "CloakHostModeX" (introduced in 19.2) is set.
-  Otherwise, only IRC opertators, other servers, and services are allowed to
+  Otherwise, only IRC operators, other servers, and services are allowed to
   set mode +x. This prevents regular users from changing their hostmask to
   the name of the IRC server itself, which confused quite a few people ;-)
 

+ 11 - 7
Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,8 @@ SUBDIRS = doc src man contrib
 
 EXTRA_DIST = autogen.sh configure.ng .mailmap
 
-clean-local:
+clean-local: osxpkg-clean
 	rm -f build-stamp*
-	rm -rf ngircd.dest
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
@@ -62,14 +61,18 @@ deb:
 	dpkg-buildpackage -rfakeroot -i
 
 osxpkg: have-packagemaker osxpkg-dest
-	cd contrib/MacOSX && packagemaker \
+	cd contrib/MacOSX && packagemaker --no-recommend \
 	 --doc ngIRCd.pmdoc \
 	 --out ../../$(distdir).mpkg
 	rm -f $(distdir).mpkg.zip
 	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
+	make osxpkg-clean
+
+osxpkg-clean:
+	[ ! -e ngircd.dest ] || sudo -n rm -rf ngircd.dest
 	rm -rf ngircd.dest $(distdir).mpkg
 
-osxpkg-dest: have-xcodebuild clean
+osxpkg-dest: have-xcodebuild osxpkg-clean clean
 	./configure --prefix=/opt/ngircd
 	make xcode
 	make -C contrib/MacOSX de.barton.ngircd.plist
@@ -82,8 +85,9 @@ osxpkg-dest: have-xcodebuild clean
 	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
 	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
 	chmod -R a-s,og-w,a+rX ngircd.dest
+	sudo chown -R root:wheel ngircd.dest
 
-.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-dest rpm \
-	srcdoc testsuite xcode xcode-clean
+.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-clean \
+	osxpkg-dest rpm srcdoc testsuite xcode xcode-clean
 
 # -eof-

+ 11 - 7
Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -687,9 +687,8 @@ uninstall-am:
 	uninstall uninstall-am
 
 
-clean-local:
+clean-local: osxpkg-clean
 	rm -f build-stamp*
-	rm -rf ngircd.dest
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
@@ -734,14 +733,18 @@ deb:
 	dpkg-buildpackage -rfakeroot -i
 
 osxpkg: have-packagemaker osxpkg-dest
-	cd contrib/MacOSX && packagemaker \
+	cd contrib/MacOSX && packagemaker --no-recommend \
 	 --doc ngIRCd.pmdoc \
 	 --out ../../$(distdir).mpkg
 	rm -f $(distdir).mpkg.zip
 	zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
+	make osxpkg-clean
+
+osxpkg-clean:
+	[ ! -e ngircd.dest ] || sudo -n rm -rf ngircd.dest
 	rm -rf ngircd.dest $(distdir).mpkg
 
-osxpkg-dest: have-xcodebuild clean
+osxpkg-dest: have-xcodebuild osxpkg-clean clean
 	./configure --prefix=/opt/ngircd
 	make xcode
 	make -C contrib/MacOSX de.barton.ngircd.plist
@@ -754,9 +757,10 @@ osxpkg-dest: have-xcodebuild clean
 	rm ngircd.dest/opt/ngircd/etc/ngircd.conf
 	echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
 	chmod -R a-s,og-w,a+rX ngircd.dest
+	sudo chown -R root:wheel ngircd.dest
 
-.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-dest rpm \
-	srcdoc testsuite xcode xcode-clean
+.PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-clean \
+	osxpkg-dest rpm srcdoc testsuite xcode xcode-clean
 
 # -eof-
 

+ 85 - 1
NEWS

@@ -9,6 +9,90 @@
                                   -- NEWS --
 
 
+ngIRCd 21 (2013-10-30)
+
+  - Call arc4random_stir() in forked subprocesses, when available. This
+    is required by FreeBSD <10 and current NetBSD at least to correctly
+    initialize the "arc4" random number generator on these platforms.
+
+  ngIRCd 21~rc2 (2013-10-20)
+  - Report the correct configuration file name on configuration errors,
+    support longer configuration lines, and warn when lines are truncated.
+
+  ngIRCd 21~rc1 (2013-10-05)
+  - Actually KILL clients on GLINE/KLINE. (Closes bug #156)
+  - Add support to show all user links using the "STATS L" (uppercase)
+    command (restricted to IRC Operators).
+  - Implement configurable SSL cipher list selection for GnuTLS and OpenSSL
+    using the new configuration option "CipherList". In addition, this
+    changes the defaults to more secure values: "HIGH:!aNULL:@STRENGTH" for
+    OpenSSL, and "SECURE128" for GnuTLS.
+  - Show connection flag "s" (SSL) in RPL_TRACE{LINK|SERVER} messages: now
+    you can check if a server-to-server link is SSL-encrypted or not using
+    the IRC "TRACE" command.
+  - Implement the new configuration option "DefaultUserModes" which lists
+    user modes that become automatically set on new local clients right
+    after login. Please note that only modes can be set that the client
+    could set on itself, so you can't set "a" (away) or "o" (IRC Op),
+    for example! User modes "i" (invisible) or "x" (cloaked) etc. are
+    "interesting", though. (Closes bug #160)
+  - Add support for the new METADATA "account" property, which allows
+    services to automatically identify users after netsplits and across
+    service restarts.
+  - Implement a new configuration option "AllowedChannelTypes" that lists
+    all allowed channel types (channel prefixes) for newly created channels
+    on the local server. By default, all supported channel types are allowed.
+    If set to the empty string, local clients can't create new channels at
+    all, which equals the old "PredefChannelsOnly = yes" setting.
+    This change deprecates the "PredefChannelsOnly" variable, too, but it is
+    still supported and translated to the appropriate "AllowedChannelTypes"
+    setting. When the old "PredefChannelsOnly" variable is processed, a
+    warning message is logged. (Closes bug #152)
+  - Add support for "client certificate fingerprinting". When a client
+    passes an SSL certificate to the server, the "fingerprint" will be
+    forwarded in the network which enables IRC services to identify the
+    user using this certificate and not using passwords.
+  - Implement a new configuration option "IncludeDir" in the "[Options]"
+    section that can be used to specify a directory which can contain
+    further configuration files and configuration file snippets matching
+    the pattern "*.conf". These files are read in after the main server
+    configuration file ("ngircd.conf" by default) has been read in and
+    parsed.  The default is "$SYSCONFDIR/ngircd.conf.d", so that it is
+    possible to adjust the configuration only by placing additional files
+    into this directory. (Closes bug #157)
+  - Add Travis-CI configuration file (".travis.yml") to project.
+  - ngIRCd now 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)
+  - Lots of IRC "information functions" like ADMIN, INFO, ... now accept
+    server masks and names of connected users (in addition to server names)
+    for specifying the target server of the command. (Closes bug #153)
+  - Implement 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.
+  - Implement support for systemd(8) "socket activation".
+  - Enable WHOIS to display information about IRC Services using the new
+    numeric 310(RPL_WHOISSERVICE) 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 is displayed in the output.
+  - Update systemd(8) example configuration files in ./contrib/ directory:
+    the "ngircd.service" file now uses the "forking" service type which
+    enhances the log messages shown by "systemctl status ngircd.service",
+    and the new "ngircd.socket" file configures a systemd socket that
+    configures a socket for ngIRCd and launches the daemon on demand.
+  - Enhance help system and the HELP command: now a "help text file" can be
+    set using the new configuration option "HelpFile" ("global" section),
+    which is read in and parsed on server startup and configuration reload,
+    and then is used to output individual help texts to specific topics.
+    Please see the file ./doc/Commands.txt for details.
+
 ngIRCd 20.3 (2013-08-23)
 
   - This release is a bugfix release only, without new features.
@@ -32,7 +116,7 @@ ngIRCd 20 (2012-12-17)
 
   - Allow user names ("INDENT") up to 20 characters when ngIRCd has not
     been configured for "strict RFC mode". This is useful if you are using
-    external (PAM) authenticaion mechanisms that require longer user names.
+    external (PAM) authentication mechanisms that require longer user names.
     Patch suggested by Brett Smith <brett@w3.org>, see
     <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>.
 

+ 22 - 7
autogen.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,8 +73,12 @@ Search()
 	for name in $searchlist; do
 		$EXIST "${name}" >/dev/null 2>&1
 		if [ $? -eq 0 ]; then
-			echo "${name}"
-			return 0
+			"${name}" --version 2>&1 \
+			 | grep -v "environment variable" >/dev/null 2>&1
+			if [ $? -eq 0 ]; then
+				echo "${name}"
+				return 0
+			fi
 		fi
 	done
 
@@ -144,6 +148,15 @@ echo "Searching for required tools ..."
 [ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
 [ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
 
+AUTOCONF_VERSION=`echo $AUTOCONF | cut -d'-' -f2-`
+[ -n "$AUTOCONF_VERSION" -a "$AUTOCONF_VERSION" != "autoconf" ] \
+	&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
+[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
+AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
+[ -n "$AUTOMAKE_VERSION" -a "$AUTOMAKE_VERSION" != "automake" ] \
+	&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
+[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
+
 [ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
 [ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
 
@@ -156,21 +169,23 @@ echo "Searching for required tools ..."
 AM_VERSION=`$AUTOMAKE --version | head -n 1 | sed -e 's/.* //g'`
 ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
 AM_MAJOR="$1"; AM_MINOR="$2"; AM_PATCHLEVEL="$3"
+echo "Detected automake $AM_VERSION ..."
 
 AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
 
+# De-ANSI-fication?
 if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -lt "12" ]; then
 	# automake < 1.12 => automatic de-ANSI-fication support available
-	echo "Enabling de-ANSI-fication support (automake $AM_VERSION) ..."
+	echo " - Enabling de-ANSI-fication support."
 	sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac
 	DEANSI_START=""
 	DEANSI_END=""
 else
 	# automake >= 1.12 => no de-ANSI-fication support available
-	echo "Disabling de-ANSI-fication support (automake $AM_VERSION) ..."
+	echo " - Disabling de-ANSI-fication support."
 	sed -e "s|^__ng_PROTOTYPES__|AC_C_PROTOTYPES|g" configure.ng >configure.ac
 	DEANSI_START="#"
-	DEANSI_END="	# disabled by ./autogen.sh script"
+	DEANSI_END=" (disabled by ./autogen.sh script)"
 fi
 # Serial test harness?
 if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -ge "13" ]; then
@@ -193,7 +208,7 @@ done
 export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
 
 # Generate files
-echo "Generating files using GNU $AUTOCONF and $AUTOMAKE ..."
+echo "Generating files using \"$AUTOCONF\" and \"$AUTOMAKE\" ..."
 Run $ACLOCAL && \
 	Run $AUTOCONF && \
 	Run $AUTOHEADER && \

+ 82 - 16
configure

@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for ngIRCd 20.3.
+# Generated by GNU Autoconf 2.67 for ngIRCd 21.
 #
 # Report bugs to <ngircd-ml@ngircd.barton.de>.
 #
@@ -552,8 +552,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ngIRCd'
 PACKAGE_TARNAME='ngircd'
-PACKAGE_VERSION='20.3'
-PACKAGE_STRING='ngIRCd 20.3'
+PACKAGE_VERSION='21'
+PACKAGE_STRING='ngIRCd 21'
 PACKAGE_BUGREPORT='ngircd-ml@ngircd.barton.de'
 PACKAGE_URL='http://ngircd.barton.de/'
 
@@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ngIRCd 20.3 to adapt to many kinds of systems.
+\`configure' configures ngIRCd 21 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1339,7 +1339,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ngIRCd 20.3:";;
+     short | recursive ) echo "Configuration of ngIRCd 21:";;
    esac
   cat <<\_ACEOF
 
@@ -1373,7 +1373,7 @@ Optional Packages:
   --with-tcp-wrappers     enable TCP wrappers support
   --with-ident            enable "IDENT" ("AUTH") protocol support
   --with-pam              enable user authentication using PAM
-  --with-iconv            enable character conversation using libiconv
+  --with-iconv            enable character conversion using libiconv
 
 Some influential environment variables:
   CC          C compiler command
@@ -1452,7 +1452,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ngIRCd configure 20.3
+ngIRCd configure 21
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1985,7 +1985,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ngIRCd $as_me 20.3, which was
+It was created by ngIRCd $as_me 21, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -2274,6 +2274,8 @@ as_fn_append ac_header_list " stdbool.h"
 as_fn_append ac_header_list " stddef.h"
 as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_header_list " varargs.h"
+as_fn_append ac_func_list " arc4random"
+as_fn_append ac_func_list " arc4random_stir"
 as_fn_append ac_func_list " gai_strerror"
 as_fn_append ac_func_list " getaddrinfo"
 as_fn_append ac_func_list " getnameinfo"
@@ -2283,6 +2285,7 @@ as_fn_append ac_func_list " sigprocmask"
 as_fn_append ac_func_list " snprintf"
 as_fn_append ac_func_list " vsnprintf"
 as_fn_append ac_func_list " strdup"
+as_fn_append ac_func_list " strndup"
 as_fn_append ac_func_list " strlcpy"
 as_fn_append ac_func_list " strlcat"
 as_fn_append ac_func_list " strtok_r"
@@ -2898,7 +2901,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ngircd'
- VERSION='20.3'
+ VERSION='21'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5044,7 +5047,7 @@ esac
 # Add additional CFLAGS, eventually specified on the command line:
 test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
 
-CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
+CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'"
 
 # -- Headers --
 
@@ -5996,6 +5999,12 @@ done
 
 
 
+
+
+
+
+
+
 # -- Configuration options --
 
 # use syslog?
@@ -7120,14 +7129,71 @@ if test "x$ac_cv_func_iconv_open" = x""yes; then :
 #define HAVE_ICONV_OPEN 1
 _ACEOF
  x_iconv_on=yes
+fi
+done
+
+			if test "$x_iconv_on" != "yes"; then
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5
+$as_echo_n "checking for libiconv_open in -liconv... " >&6; }
+if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char libiconv_open ();
+int
+main ()
+{
+return libiconv_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_iconv_libiconv_open=yes
 else
-  as_fn_error $? "Can't enable libiconv support!" "$LINENO" 5
+  ac_cv_lib_iconv_libiconv_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5
+$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; }
+if test "x$ac_cv_lib_iconv_libiconv_open" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBICONV 1
+_ACEOF
+
+  LIBS="-liconv $LIBS"
 
 fi
-done
 
-		  fi
+				for ac_func in libiconv_open
+do :
+  ac_fn_c_check_func "$LINENO" "libiconv_open" "ac_cv_func_libiconv_open"
+if test "x$ac_cv_func_libiconv_open" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBICONV_OPEN 1
+_ACEOF
+ x_iconv_on=yes
+fi
+done
 
+			fi
+			if test "$x_iconv_on" != "yes"; then
+				as_fn_error $? "Can't enable libiconv support!" "$LINENO" 5
+			fi
+		fi
 
 fi
 
@@ -7766,7 +7832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ngIRCd $as_me 20.3, which was
+This file was extended by ngIRCd $as_me 21, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7833,7 +7899,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ngIRCd config.status 20.3
+ngIRCd config.status 21
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
@@ -8780,7 +8846,7 @@ test "$x_ipv6_on" = "yes" \
 	&& echo $ECHO_N "yes   $ECHO_C" \
 	|| echo $ECHO_N "no    $ECHO_C"
 echo $ECHO_N "        I/O backend: $ECHO_C"
-	echo "\"$x_io_backend\""
+	echo "$x_io_backend"
 
 echo $ECHO_N "        PAM support: $ECHO_C"
 test "$x_pam_on" = "yes" \

+ 16 - 10
configure.ac

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ esac
 # Add additional CFLAGS, eventually specified on the command line:
 test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
 
-CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
+CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'"
 
 # -- Headers --
 
@@ -187,8 +187,9 @@ AC_CHECK_FUNCS([ \
 
 # Optional functions
 AC_CHECK_FUNCS_ONCE([ \
-	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
-	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
+	arc4random arc4random_stir gai_strerror getaddrinfo getnameinfo inet_aton
+	sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
+	strtok_r waitpid])
 
 # -- Configuration options --
 
@@ -518,7 +519,8 @@ if test "$x_ircplus_on" = "yes"; then
 	# CHARCONV is the only function depending on it.
 	x_iconv_on=no
 	AC_ARG_WITH(iconv,
-		[  --with-iconv            enable character conversation using libiconv],
+		AS_HELP_STRING([--with-iconv],
+			       [enable character conversion using libiconv]),
 		[ if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -526,11 +528,15 @@ if test "$x_ircplus_on" = "yes"; then
 				LDFLAGS="-L$withval/lib $LDFLAGS"
 			fi
 			AC_CHECK_LIB(iconv, iconv_open)
-			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
+			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes)
+			if test "$x_iconv_on" != "yes"; then
+				AC_CHECK_LIB(iconv, libiconv_open)
+				AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes)
+			fi
+			if test "$x_iconv_on" != "yes"; then
 				AC_MSG_ERROR([Can't enable libiconv support!])
-			)
-		  fi
-		]
+			fi
+		fi ]
 	)
 	if test "$x_iconv_on" = "yes"; then
 		AC_DEFINE(ICONV, 1)
@@ -697,7 +703,7 @@ test "$x_ipv6_on" = "yes" \
 	&& echo $ECHO_N "yes   $ECHO_C" \
 	|| echo $ECHO_N "no    $ECHO_C"
 echo $ECHO_N "        I/O backend: $ECHO_C"
-	echo "\"$x_io_backend\""
+	echo "$x_io_backend"
 
 echo $ECHO_N "        PAM support: $ECHO_C"
 test "$x_pam_on" = "yes" \

+ 16 - 10
configure.ng

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ esac
 # Add additional CFLAGS, eventually specified on the command line:
 test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
 
-CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
+CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'"
 
 # -- Headers --
 
@@ -187,8 +187,9 @@ AC_CHECK_FUNCS([ \
 
 # Optional functions
 AC_CHECK_FUNCS_ONCE([ \
-	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
-	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
+	arc4random arc4random_stir gai_strerror getaddrinfo getnameinfo inet_aton
+	sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
+	strtok_r waitpid])
 
 # -- Configuration options --
 
@@ -518,7 +519,8 @@ if test "$x_ircplus_on" = "yes"; then
 	# CHARCONV is the only function depending on it.
 	x_iconv_on=no
 	AC_ARG_WITH(iconv,
-		[  --with-iconv            enable character conversation using libiconv],
+		AS_HELP_STRING([--with-iconv],
+			       [enable character conversion using libiconv]),
 		[ if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -526,11 +528,15 @@ if test "$x_ircplus_on" = "yes"; then
 				LDFLAGS="-L$withval/lib $LDFLAGS"
 			fi
 			AC_CHECK_LIB(iconv, iconv_open)
-			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
+			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes)
+			if test "$x_iconv_on" != "yes"; then
+				AC_CHECK_LIB(iconv, libiconv_open)
+				AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes)
+			fi
+			if test "$x_iconv_on" != "yes"; then
 				AC_MSG_ERROR([Can't enable libiconv support!])
-			)
-		  fi
-		]
+			fi
+		fi ]
 	)
 	if test "$x_iconv_on" = "yes"; then
 		AC_DEFINE(ICONV, 1)
@@ -697,7 +703,7 @@ test "$x_ipv6_on" = "yes" \
 	&& echo $ECHO_N "yes   $ECHO_C" \
 	|| echo $ECHO_N "no    $ECHO_C"
 echo $ECHO_N "        I/O backend: $ECHO_C"
-	echo "\"$x_io_backend\""
+	echo "$x_io_backend"
 
 echo $ECHO_N "        PAM support: $ECHO_C"
 test "$x_pam_on" = "yes" \

+ 31 - 0
contrib/Debian/changelog

@@ -1,3 +1,34 @@
+ngircd (21-0ab1) unstable; urgency=low
+
+  * New "upstream" release: ngIRCd 21.
+
+ -- Alexander Barton <alex@barton.de>  Wed, 30 Oct 2013 22:13:55 +0100
+
+ngircd (21~rc2-0ab3) unstable; urgency=low
+
+  * Fix sed(1) rules adjusting "ngircd-full" package, error introduced
+    by last commit :-/
+
+ -- Alexander Barton <alex@barton.de>  Sun, 20 Oct 2013 18:31:16 +0200
+
+ngircd (21~rc2-0ab2) unstable; urgency=low
+
+  * Fix default "HelpFile" file name in ngircd.conf for "full" packages.
+
+ -- Alexander Barton <alex@barton.de>  Sun, 20 Oct 2013 17:18:28 +0200
+
+ngircd (21~rc2-0ab1) unstable; urgency=low
+
+  * New "upstream" release candidate 2 for ngIRCd Release 21.
+
+ -- Alexander Barton <alex@barton.de>  Sun, 20 Oct 2013 15:50:03 +0200
+
+ngircd (21~rc1-0ab1) unstable; urgency=low
+
+  * New "upstream" release candidate 1 for ngIRCd Release 21.
+
+ -- Alexander Barton <alex@barton.de>  Sat, 05 Oct 2013 23:24:09 +0200
+
 ngircd (20.3-0ab1) unstable; urgency=high
 
   * New "upstream" release, fixing a security related bug: ngIRCd 20.3.

+ 0 - 2
contrib/Debian/ngircd.default

@@ -1,8 +1,6 @@
 #
 # Defaults for ngIRCd start and stop script
 #
-# $Id: ngircd.default,v 1.1 2003/12/31 17:20:11 alex Exp $
-#
 
 # Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
 # possible options (default: empty).

+ 4 - 3
contrib/Debian/ngircd.init

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd start and stop script for Debian-based systems
-# Copyright 2008-2010 Alexander Barton <alex@barton.de>
+# Copyright 2008-2013 Alexander Barton <alex@barton.de>
 #
 
 ### BEGIN INIT INFO
@@ -24,13 +24,13 @@ PARAMS=""
 STARTTIME=1
 DIETIME=10
 
-test -x $DAEMON || exit 5
-
 test -h "$0" && me=`readlink $0` || me="$0"
 BASENAME=`basename $me`
 
 test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
 
+test -x $DAEMON || exit 5
+
 # LSB compatibility functions that become used if there is no local
 # include file available.
 log_daemon_msg() {
@@ -84,6 +84,7 @@ Do_Start() {
 		log_warning_msg "$NAME seems to be already running, nothing to do."
 		exit 0
 	fi
+	rm -f "$PIDFILE"
 	start-stop-daemon --start \
 		--quiet --exec $DAEMON -- $PARAMS
 	sleep $STARTTIME

+ 15 - 13
contrib/Debian/rules

@@ -139,10 +139,10 @@ install-ngircd: build-ngircd
 	rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
 	mkdir -p $(CURDIR)/debian/ngircd/var/run/ircd
 	cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
-	 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
-	 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
-	 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
-	 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
+	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
+	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
+	 sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = |/etc/ngircd/ngircd.motd|g" | \
+	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
 	 >$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
 	touch $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
 
@@ -159,10 +159,11 @@ install-ngircd-full: build-ngircd-full
 	 $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full
 	mkdir -p $(CURDIR)/debian/ngircd-full/var/run/ircd
 	cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
-	 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
-	 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
-	 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
-	 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
+	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
+	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
+	 sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = /etc/ngircd/ngircd.motd|g" | \
+	 sed -e "s|;HelpFile = /usr/share/doc/ngircd/Commands.txt|HelpFile = /usr/share/doc/ngircd-full/Commands.txt|g" | \
+	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
 	 >$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
 	touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
 	mkdir -p $(CURDIR)/debian/ngircd-full/etc/pam.d
@@ -181,10 +182,11 @@ install-ngircd-full-dbg: build-ngircd-full-dbg
 	 $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg
 	mkdir -p $(CURDIR)/debian/ngircd-full-dbg/var/run/ircd
 	cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
-	 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
-	 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
-	 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
-	 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
+	 sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
+	 sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
+	 sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = /etc/ngircd/ngircd.motd|g" | \
+	 sed -e "s|;HelpFile = /usr/share/doc/ngircd/Commands.txt|HelpFile = /usr/share/doc/ngircd-full-dbg/Commands.txt|g" | \
+	 sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
 	 >$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf
 	touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd
 	mkdir -p $(CURDIR)/debian/ngircd-full-dbg/etc/pam.d
@@ -216,7 +218,7 @@ binary-arch: build install
 	dh_installdocs -a
 	dh_installinit -a
 	dh_strip -a --no-package=ngircd-full-dbg
-	dh_compress -a
+	dh_compress -a -XCommands.txt
 	dh_fixperms -a
 	dh_installdeb -a
 	dh_shlibdeps -a

+ 12 - 7
contrib/MacOSX/config.h

@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -12,17 +12,22 @@
  */
 
 #define PACKAGE_NAME "ngIRCd"
-#define PACKAGE "ngircd"
+# define PACKAGE "ngircd"
 #ifndef VERSION
-#define VERSION "??("__DATE__")"
+# define VERSION "??("__DATE__")"
 #endif
-#define SYSCONFDIR "/etc/ngircd"
 
-#ifndef TARGET_VENDOR
-#define TARGET_VENDOR "apple"
-#define TARGET_OS "darwin"
+#ifndef HOST_VENDOR
+# define HOST_VENDOR "apple"
+# define HOST_OS "darwin"
+# ifdef __x86_64
+#  define HOST_CPU "x86_64"
+# endif
 #endif
 
+#define SYSCONFDIR "/etc/ngircd"
+#define DOCDIR "/usr/share/doc/ngircd"
+
 /* -- Build options -- */
 
 /* Define if debug-mode should be enabled */

File diff suppressed because it is too large
+ 1 - 1
contrib/MacOSX/ngIRCd.pmdoc/01ngircd-contents.xml


File diff suppressed because it is too large
+ 1 - 1
contrib/MacOSX/ngIRCd.pmdoc/01ngircd.xml


File diff suppressed because it is too large
+ 2 - 2
contrib/MacOSX/ngIRCd.pmdoc/index.xml


+ 67 - 129
contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj

@@ -64,12 +64,27 @@
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
-		FA1A6BBC0D6857BB00AA8F71 /* misc-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "misc-test.e"; sourceTree = "<group>"; };
+		FA18A63E16CEDDCE00132F66 /* configure.ng */ = {isa = PBXFileReference; lastKnownFileType = text; name = configure.ng; path = ../../configure.ng; sourceTree = "<group>"; };
+		FA18A63F16CEDE2300132F66 /* ngircd.service */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.service; sourceTree = "<group>"; };
+		FA18A64016CEDE2300132F66 /* ngircd.socket */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.socket; sourceTree = "<group>"; };
+		FA18A64116CEDE3500132F66 /* ngircd.pam */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.pam; sourceTree = "<group>"; };
+		FA18A64216CEDE5700132F66 /* de.barton.ngircd.plist.tmpl */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = de.barton.ngircd.plist.tmpl; sourceTree = "<group>"; };
+		FA18A64316CEDE8100132F66 /* Makefile.am */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
+		FA18A64416CEDFCE00132F66 /* Commands.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Commands.txt; sourceTree = "<group>"; };
+		FA18A64516CEE0C700132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; name = Makefile.ng; path = ipaddr/Makefile.ng; sourceTree = "<group>"; };
+		FA18A64616CEE0DD00132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
+		FA18A64716CEE14900132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
+		FA18A64A16CEE18100132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
+		FA18A64C16CEE1AC00132F66 /* mode-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mode-test.e"; sourceTree = "<group>"; };
+		FA18A64D16CEE1D900132F66 /* whois-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "whois-test.e"; sourceTree = "<group>"; };
+		FA18A64E16CEE24B00132F66 /* misc-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "misc-test.e"; sourceTree = "<group>"; };
+		FA18A64F16CEE27700132F66 /* Makefile.ng */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.ng; sourceTree = "<group>"; };
 		FA1A6BBD0D6857D900AA8F71 /* who-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "who-test.e"; sourceTree = "<group>"; };
+		FA1DBB6716C707D200D4F838 /* irc-macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-macros.h"; sourceTree = "<group>"; };
 		FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
 		FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
 		FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
-		FA322BBA0CEF72E4001761B3 /* ngIRCd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ngIRCd; sourceTree = BUILT_PRODUCTS_DIR; };
+		FA322BBA0CEF72E4001761B3 /* ngIRCd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = ngIRCd; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
 		FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
 		FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
@@ -112,7 +127,6 @@
 		FA322CFF0CEF74B1001761B3 /* lists.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = lists.h; sourceTree = "<group>"; };
 		FA322D000CEF74B1001761B3 /* log.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = log.c; sourceTree = "<group>"; };
 		FA322D010CEF74B1001761B3 /* log.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
-		FA322D020CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322D030CEF74B1001761B3 /* match.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = match.c; sourceTree = "<group>"; };
 		FA322D040CEF74B1001761B3 /* match.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = match.h; sourceTree = "<group>"; };
 		FA322D050CEF74B1001761B3 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = messages.h; sourceTree = "<group>"; };
@@ -126,7 +140,6 @@
 		FA322D110CEF74B1001761B3 /* ansi2knr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = ansi2knr.c; sourceTree = "<group>"; };
 		FA322D120CEF74B1001761B3 /* exp.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = exp.h; sourceTree = "<group>"; };
 		FA322D130CEF74B1001761B3 /* imp.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = imp.h; sourceTree = "<group>"; };
-		FA322D140CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322D150CEF74B1001761B3 /* portab.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = portab.h; sourceTree = "<group>"; };
 		FA322D160CEF74B1001761B3 /* portabtest.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = portabtest.c; sourceTree = "<group>"; };
 		FA322D170CEF74B1001761B3 /* splint.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = splint.h; sourceTree = "<group>"; };
@@ -138,8 +151,6 @@
 		FA322D1F0CEF74B1001761B3 /* connect-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "connect-test.e"; sourceTree = "<group>"; };
 		FA322D200CEF74B1001761B3 /* functions.inc */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.pascal; path = functions.inc; sourceTree = "<group>"; };
 		FA322D210CEF74B1001761B3 /* getpid.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = getpid.sh; sourceTree = "<group>"; };
-		FA322D220CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322D230CEF74B1001761B3 /* mode-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "mode-test.e"; sourceTree = "<group>"; };
 		FA322D250CEF74B1001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
 		FA322D260CEF74B1001761B3 /* start-server.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "start-server.sh"; sourceTree = "<group>"; };
 		FA322D270CEF74B1001761B3 /* stop-server.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "stop-server.sh"; sourceTree = "<group>"; };
@@ -149,9 +160,6 @@
 		FA322D2B0CEF74B1001761B3 /* test-loop.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "test-loop.sh"; sourceTree = "<group>"; };
 		FA322D2C0CEF74B1001761B3 /* tests.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = tests.sh; sourceTree = "<group>"; };
 		FA322D2D0CEF74B1001761B3 /* wait-tests.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = "wait-tests.sh"; sourceTree = "<group>"; };
-		FA322D300CEF74B1001761B3 /* ansi2knr.1 */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.man; path = ansi2knr.1; sourceTree = "<group>"; };
-		FA322D310CEF74B1001761B3 /* ansi2knr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = ansi2knr.c; sourceTree = "<group>"; };
-		FA322D320CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322D330CEF74B1001761B3 /* tool.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = tool.c; sourceTree = "<group>"; };
 		FA322D340CEF74B1001761B3 /* tool.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = tool.h; sourceTree = "<group>"; };
 		FA322D5A0CEF750F001761B3 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = AUTHORS; path = ../../AUTHORS; sourceTree = SOURCE_ROOT; };
@@ -159,7 +167,6 @@
 		FA322D5C0CEF750F001761B3 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = ChangeLog; path = ../../ChangeLog; sourceTree = SOURCE_ROOT; };
 		FA322D5E0CEF750F001761B3 /* config.guess */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.guess; path = ../../config.guess; sourceTree = SOURCE_ROOT; };
 		FA322D5F0CEF750F001761B3 /* config.sub */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.sub; path = ../../config.sub; sourceTree = SOURCE_ROOT; };
-		FA322D600CEF750F001761B3 /* configure.in */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = configure.in; path = ../../configure.in; sourceTree = SOURCE_ROOT; };
 		FA322D610CEF750F001761B3 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = COPYING; path = ../../COPYING; sourceTree = SOURCE_ROOT; };
 		FA322D620CEF750F001761B3 /* INSTALL */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = INSTALL; path = ../../INSTALL; sourceTree = SOURCE_ROOT; };
 		FA322D630CEF750F001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = ../../Makefile.am; sourceTree = SOURCE_ROOT; };
@@ -174,9 +181,8 @@
 		FA322D700CEF7523001761B3 /* ngircd.init */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.init; sourceTree = "<group>"; };
 		FA322D710CEF7523001761B3 /* ngircd.postinst */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.postinst; sourceTree = "<group>"; };
 		FA322D720CEF7523001761B3 /* rules */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = rules; sourceTree = "<group>"; };
-		FA322D8D0CEF7523001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
+		FA322D8D0CEF7523001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = MacOSX/Makefile.am; sourceTree = "<group>"; };
 		FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = ngIRCd.xcodeproj; sourceTree = "<group>"; };
-		FA322D910CEF7523001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322D920CEF7523001761B3 /* ngindent */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngindent; sourceTree = "<group>"; };
 		FA322D940CEF7523001761B3 /* ngircd.spec */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.spec; sourceTree = "<group>"; };
 		FA322D950CEF7523001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
@@ -190,16 +196,13 @@
 		FA322DA00CEF752C001761B3 /* RFC.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = RFC.txt; sourceTree = "<group>"; };
 		FA322DA40CEF752C001761B3 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; };
 		FA322DA50CEF752C001761B3 /* footer.inc.html */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.html; path = footer.inc.html; sourceTree = "<group>"; };
-		FA322DA60CEF752C001761B3 /* header.inc.html */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.html; path = header.inc.html; sourceTree = "<group>"; };
 		FA322DA70CEF752C001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
-		FA322DA80CEF752C001761B3 /* ngircd-doc.css */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.css; path = "ngircd-doc.css"; sourceTree = "<group>"; };
 		FA322DA90CEF752C001761B3 /* SSL.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = SSL.txt; sourceTree = "<group>"; };
 		FA322DAD0CEF7538001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
 		FA322DAE0CEF7538001761B3 /* ngircd.8.tmpl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.8.tmpl; sourceTree = "<group>"; };
 		FA322DAF0CEF7538001761B3 /* ngircd.conf.5.tmpl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.conf.5.tmpl; sourceTree = "<group>"; };
 		FA322DB10CEF7565001761B3 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
 		FA322DC00CEF77CB001761B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
-		FA407F2B0DB159F400271AF1 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = ipaddr/Makefile.am; sourceTree = "<group>"; };
 		FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; };
 		FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; };
 		FA407F380DB15AC700271AF1 /* GIT.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = GIT.txt; sourceTree = "<group>"; };
@@ -279,28 +282,32 @@
 		08FB7794FE84155DC02AAC07 /* ngIRCd */ = {
 			isa = PBXGroup;
 			children = (
-				FA322D970CEF752C001761B3 /* doc */,
+				FA322D630CEF750F001761B3 /* Makefile.am */,
 				FA322D660CEF7523001761B3 /* contrib */,
+				FA322D970CEF752C001761B3 /* doc */,
 				FA322DAB0CEF7538001761B3 /* man */,
 				FA322CD40CEF74B0001761B3 /* src */,
 				FA322D5A0CEF750F001761B3 /* AUTHORS */,
+				FA322D5C0CEF750F001761B3 /* ChangeLog */,
 				FA322D610CEF750F001761B3 /* COPYING */,
 				FA322D620CEF750F001761B3 /* INSTALL */,
 				FA322D640CEF750F001761B3 /* NEWS */,
 				FA322D650CEF750F001761B3 /* README */,
 				FA322D5B0CEF750F001761B3 /* autogen.sh */,
-				FA322D5C0CEF750F001761B3 /* ChangeLog */,
 				FA322D5E0CEF750F001761B3 /* config.guess */,
 				FA322D5F0CEF750F001761B3 /* config.sub */,
-				FA322D600CEF750F001761B3 /* configure.in */,
-				FA322D630CEF750F001761B3 /* Makefile.am */,
+				FA18A63E16CEDDCE00132F66 /* configure.ng */,
 				1AB674ADFE9D54B511CA2CBB /* Products */,
 				FA6BBC651605F6D60004247A /* libiconv.dylib */,
 				FA2D567A11EA1AB300D37A35 /* libpam.dylib */,
 				FA322DC00CEF77CB001761B3 /* libz.dylib */,
 			);
+			indentWidth = 8;
 			name = ngIRCd;
 			sourceTree = "<group>";
+			tabWidth = 8;
+			usesTabs = 1;
+			wrapsLines = 0;
 		};
 		1AB674ADFE9D54B511CA2CBB /* Products */ = {
 			isa = PBXGroup;
@@ -313,12 +320,12 @@
 		FA322CD40CEF74B0001761B3 /* src */ = {
 			isa = PBXGroup;
 			children = (
-				FA322CD70CEF74B1001761B3 /* ngircd */,
+				FA322CD60CEF74B1001761B3 /* Makefile.am */,
 				FA407F270DB1598D00271AF1 /* ipaddr */,
+				FA322CD70CEF74B1001761B3 /* ngircd */,
 				FA322D0E0CEF74B1001761B3 /* portab */,
 				FA322D1B0CEF74B1001761B3 /* testsuite */,
 				FA322D2E0CEF74B1001761B3 /* tool */,
-				FA322CD60CEF74B1001761B3 /* Makefile.am */,
 			);
 			name = src;
 			path = ../../src;
@@ -327,7 +334,7 @@
 		FA322CD70CEF74B1001761B3 /* ngircd */ = {
 			isa = PBXGroup;
 			children = (
-				FA322D020CEF74B1001761B3 /* Makefile.am */,
+				FA18A64616CEE0DD00132F66 /* Makefile.ng */,
 				FA322CD90CEF74B1001761B3 /* array.c */,
 				FA322CDA0CEF74B1001761B3 /* array.h */,
 				FA322CDB0CEF74B1001761B3 /* channel.c */,
@@ -347,10 +354,10 @@
 				FA6BBC601605F0AC0004247A /* conn-encoding.h */,
 				FA322CE10CEF74B1001761B3 /* conn-func.c */,
 				FA322CE20CEF74B1001761B3 /* conn-func.h */,
-				FA322CE30CEF74B1001761B3 /* conn-zip.c */,
-				FA322CE40CEF74B1001761B3 /* conn-zip.h */,
 				FAA3D2790F139CDC00B2447E /* conn-ssl.c */,
 				FAA3D27A0F139CDC00B2447E /* conn-ssl.h */,
+				FA322CE30CEF74B1001761B3 /* conn-zip.c */,
+				FA322CE40CEF74B1001761B3 /* conn-zip.h */,
 				FA322CE70CEF74B1001761B3 /* defines.h */,
 				FA322CE80CEF74B1001761B3 /* hash.c */,
 				FA322CE90CEF74B1001761B3 /* hash.h */,
@@ -368,6 +375,7 @@
 				FA322CEF0CEF74B1001761B3 /* irc-info.h */,
 				FA322CF00CEF74B1001761B3 /* irc-login.c */,
 				FA322CF10CEF74B1001761B3 /* irc-login.h */,
+				FA1DBB6716C707D200D4F838 /* irc-macros.h */,
 				FA4F1659164836B100DBD011 /* irc-metadata.c */,
 				FA4F165C164836BF00DBD011 /* irc-metadata.h */,
 				FA322CF20CEF74B1001761B3 /* irc-mode.c */,
@@ -412,19 +420,19 @@
 		FA322D0E0CEF74B1001761B3 /* portab */ = {
 			isa = PBXGroup;
 			children = (
-				FAA3D27C0F139CF800B2447E /* strtok_r.c */,
-				FAA3D27D0F139CF800B2447E /* waitpid.c */,
+				FA18A64716CEE14900132F66 /* Makefile.ng */,
 				FA322D100CEF74B1001761B3 /* ansi2knr.1 */,
 				FA322D110CEF74B1001761B3 /* ansi2knr.c */,
 				FA322D120CEF74B1001761B3 /* exp.h */,
 				FA322D130CEF74B1001761B3 /* imp.h */,
-				FA322D140CEF74B1001761B3 /* Makefile.am */,
 				FA322D150CEF74B1001761B3 /* portab.h */,
 				FA322D160CEF74B1001761B3 /* portabtest.c */,
 				FA322D170CEF74B1001761B3 /* splint.h */,
 				FA322D180CEF74B1001761B3 /* strdup.c */,
 				FA322D190CEF74B1001761B3 /* strlcpy.c */,
+				FAA3D27C0F139CF800B2447E /* strtok_r.c */,
 				FA322D1A0CEF74B1001761B3 /* vsnprintf.c */,
+				FAA3D27D0F139CF800B2447E /* waitpid.c */,
 			);
 			path = portab;
 			sourceTree = "<group>";
@@ -432,32 +440,33 @@
 		FA322D1B0CEF74B1001761B3 /* testsuite */ = {
 			isa = PBXGroup;
 			children = (
+				FA18A64A16CEE18100132F66 /* Makefile.ng */,
+				FA322D250CEF74B1001761B3 /* README */,
+				FA322D1D0CEF74B1001761B3 /* channel-test.e */,
+				FA322D1E0CEF74B1001761B3 /* check-idle.e */,
+				FA322D1F0CEF74B1001761B3 /* connect-test.e */,
 				FAA3D2700F139CB300B2447E /* invite-test.e */,
 				FAA3D2710F139CB300B2447E /* join-test.e */,
 				FAA3D2720F139CB300B2447E /* kick-test.e */,
 				FAA3D2730F139CB300B2447E /* message-test.e */,
-				FAA3D2740F139CB300B2447E /* ngircd-test1.conf */,
-				FAA3D2750F139CB300B2447E /* ngircd-test2.conf */,
+				FA18A64E16CEE24B00132F66 /* misc-test.e */,
+				FA18A64C16CEE1AC00132F66 /* mode-test.e */,
 				FAA3D2760F139CB300B2447E /* opless-channel-test.e */,
 				FAA3D2770F139CB300B2447E /* server-link-test.e */,
-				FA322D1D0CEF74B1001761B3 /* channel-test.e */,
-				FA322D1E0CEF74B1001761B3 /* check-idle.e */,
-				FA322D1F0CEF74B1001761B3 /* connect-test.e */,
+				FA322D280CEF74B1001761B3 /* stress-A.e */,
+				FA322D290CEF74B1001761B3 /* stress-B.e */,
+				FA1A6BBD0D6857D900AA8F71 /* who-test.e */,
+				FA18A64D16CEE1D900132F66 /* whois-test.e */,
 				FA322D200CEF74B1001761B3 /* functions.inc */,
+				FAA3D2740F139CB300B2447E /* ngircd-test1.conf */,
+				FAA3D2750F139CB300B2447E /* ngircd-test2.conf */,
 				FA322D210CEF74B1001761B3 /* getpid.sh */,
-				FA322D220CEF74B1001761B3 /* Makefile.am */,
-				FA1A6BBC0D6857BB00AA8F71 /* misc-test.e */,
-				FA322D230CEF74B1001761B3 /* mode-test.e */,
-				FA322D250CEF74B1001761B3 /* README */,
 				FA322D260CEF74B1001761B3 /* start-server.sh */,
 				FA322D270CEF74B1001761B3 /* stop-server.sh */,
-				FA322D280CEF74B1001761B3 /* stress-A.e */,
-				FA322D290CEF74B1001761B3 /* stress-B.e */,
 				FA322D2A0CEF74B1001761B3 /* stress-server.sh */,
 				FA322D2B0CEF74B1001761B3 /* test-loop.sh */,
 				FA322D2C0CEF74B1001761B3 /* tests.sh */,
 				FA322D2D0CEF74B1001761B3 /* wait-tests.sh */,
-				FA1A6BBD0D6857D900AA8F71 /* who-test.e */,
 			);
 			path = testsuite;
 			sourceTree = "<group>";
@@ -465,9 +474,7 @@
 		FA322D2E0CEF74B1001761B3 /* tool */ = {
 			isa = PBXGroup;
 			children = (
-				FA322D300CEF74B1001761B3 /* ansi2knr.1 */,
-				FA322D310CEF74B1001761B3 /* ansi2knr.c */,
-				FA322D320CEF74B1001761B3 /* Makefile.am */,
+				FA18A64F16CEE27700132F66 /* Makefile.ng */,
 				FA322D330CEF74B1001761B3 /* tool.c */,
 				FA322D340CEF74B1001761B3 /* tool.h */,
 			);
@@ -477,16 +484,18 @@
 		FA322D660CEF7523001761B3 /* contrib */ = {
 			isa = PBXGroup;
 			children = (
+				FA322D8D0CEF7523001761B3 /* Makefile.am */,
 				FA322D680CEF7523001761B3 /* Debian */,
 				FA322D730CEF7523001761B3 /* MacOSX */,
-				FA322D910CEF7523001761B3 /* Makefile.am */,
+				FA322D950CEF7523001761B3 /* README */,
 				FA322D920CEF7523001761B3 /* ngindent */,
 				FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */,
 				FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */,
 				FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */,
+				FA18A63F16CEDE2300132F66 /* ngircd.service */,
+				FA18A64016CEDE2300132F66 /* ngircd.socket */,
 				FA322D940CEF7523001761B3 /* ngircd.spec */,
 				FA4B08E813E7F91C00765BA3 /* platformtest.sh */,
-				FA322D950CEF7523001761B3 /* README */,
 				FA322D960CEF7523001761B3 /* systrace.policy */,
 			);
 			name = contrib;
@@ -496,13 +505,14 @@
 		FA322D680CEF7523001761B3 /* Debian */ = {
 			isa = PBXGroup;
 			children = (
+				FA322D6E0CEF7523001761B3 /* Makefile.am */,
 				FA322D6A0CEF7523001761B3 /* changelog */,
 				FA322D6B0CEF7523001761B3 /* compat */,
 				FA322D6C0CEF7523001761B3 /* control */,
 				FA322D6D0CEF7523001761B3 /* copyright */,
-				FA322D6E0CEF7523001761B3 /* Makefile.am */,
 				FA322D6F0CEF7523001761B3 /* ngircd.default */,
 				FA322D700CEF7523001761B3 /* ngircd.init */,
+				FA18A64116CEDE3500132F66 /* ngircd.pam */,
 				FA322D710CEF7523001761B3 /* ngircd.postinst */,
 				FA322D720CEF7523001761B3 /* rules */,
 			);
@@ -512,88 +522,17 @@
 		FA322D730CEF7523001761B3 /* MacOSX */ = {
 			isa = PBXGroup;
 			children = (
+				FA18A64316CEDE8100132F66 /* Makefile.am */,
 				FAA3D2810F139D2E00B2447E /* ngIRCd.pmdoc */,
+				FA322DB10CEF7565001761B3 /* config.h */,
+				FA18A64216CEDE5700132F66 /* de.barton.ngircd.plist.tmpl */,
+				FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */,
 				FAA3D28A0F139D2E00B2447E /* postinstall.sh */,
 				FAA3D28B0F139D2E00B2447E /* preinstall.sh */,
-				FA322D750CEF7523001761B3 /* build */,
-				FA322D8D0CEF7523001761B3 /* Makefile.am */,
-				FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */,
-				FA322DB10CEF7565001761B3 /* config.h */,
 			);
 			path = MacOSX;
 			sourceTree = "<group>";
 		};
-		FA322D750CEF7523001761B3 /* build */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D760CEF7523001761B3 /* ngIRCd.build */,
-			);
-			path = build;
-			sourceTree = "<group>";
-		};
-		FA322D760CEF7523001761B3 /* ngIRCd.build */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D770CEF7523001761B3 /* Default */,
-				FA322D7F0CEF7523001761B3 /* ngIRCd.pbxindex */,
-			);
-			path = ngIRCd.build;
-			sourceTree = "<group>";
-		};
-		FA322D770CEF7523001761B3 /* Default */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D780CEF7523001761B3 /* ngIRCd.build */,
-			);
-			path = Default;
-			sourceTree = "<group>";
-		};
-		FA322D780CEF7523001761B3 /* ngIRCd.build */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D7A0CEF7523001761B3 /* Objects-normal */,
-			);
-			path = ngIRCd.build;
-			sourceTree = "<group>";
-		};
-		FA322D7A0CEF7523001761B3 /* Objects-normal */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D7B0CEF7523001761B3 /* i386 */,
-				FA322D7D0CEF7523001761B3 /* ppc */,
-			);
-			path = "Objects-normal";
-			sourceTree = "<group>";
-		};
-		FA322D7B0CEF7523001761B3 /* i386 */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = i386;
-			sourceTree = "<group>";
-		};
-		FA322D7D0CEF7523001761B3 /* ppc */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = ppc;
-			sourceTree = "<group>";
-		};
-		FA322D7F0CEF7523001761B3 /* ngIRCd.pbxindex */ = {
-			isa = PBXGroup;
-			children = (
-				FA322D880CEF7523001761B3 /* strings.pbxstrings */,
-			);
-			path = ngIRCd.pbxindex;
-			sourceTree = "<group>";
-		};
-		FA322D880CEF7523001761B3 /* strings.pbxstrings */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = strings.pbxstrings;
-			sourceTree = "<group>";
-		};
 		FA322D8F0CEF7523001761B3 /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -605,8 +544,10 @@
 			isa = PBXGroup;
 			children = (
 				FA322D9B0CEF752C001761B3 /* Makefile.am */,
+				FA322DA20CEF752C001761B3 /* src */,
 				FAE22BD215270EA300F1A5AB /* Bopm.txt */,
 				FAD5852F15271A7800328741 /* Capabilities.txt */,
+				FA18A64416CEDFCE00132F66 /* Commands.txt */,
 				FAE22BD415270EA300F1A5AB /* Contributing.txt */,
 				FA322D9A0CEF752C001761B3 /* FAQ.txt */,
 				FA407F380DB15AC700271AF1 /* GIT.txt */,
@@ -622,7 +563,6 @@
 				FAA3D2800F139D1500B2447E /* Services.txt */,
 				FA322DA90CEF752C001761B3 /* SSL.txt */,
 				FA77849A133FB9FF00740057 /* sample-ngircd.conf.tmpl */,
-				FA322DA20CEF752C001761B3 /* src */,
 			);
 			name = doc;
 			path = ../../doc;
@@ -631,11 +571,9 @@
 		FA322DA20CEF752C001761B3 /* src */ = {
 			isa = PBXGroup;
 			children = (
+				FA322DA70CEF752C001761B3 /* Makefile.am */,
 				FA322DA40CEF752C001761B3 /* Doxyfile */,
 				FA322DA50CEF752C001761B3 /* footer.inc.html */,
-				FA322DA60CEF752C001761B3 /* header.inc.html */,
-				FA322DA70CEF752C001761B3 /* Makefile.am */,
-				FA322DA80CEF752C001761B3 /* ngircd-doc.css */,
 			);
 			path = src;
 			sourceTree = "<group>";
@@ -654,7 +592,7 @@
 		FA407F270DB1598D00271AF1 /* ipaddr */ = {
 			isa = PBXGroup;
 			children = (
-				FA407F2B0DB159F400271AF1 /* Makefile.am */,
+				FA18A64516CEE0C700132F66 /* Makefile.ng */,
 				FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */,
 				FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */,
 			);
@@ -664,12 +602,12 @@
 		FAA3D2810F139D2E00B2447E /* ngIRCd.pmdoc */ = {
 			isa = PBXGroup;
 			children = (
-				FAA3D2820F139D2E00B2447E /* 01ngircd-contents.xml */,
+				FAA3D2880F139D2E00B2447E /* Makefile.am */,
+				FAA3D2860F139D2E00B2447E /* index.xml */,
 				FAA3D2830F139D2E00B2447E /* 01ngircd.xml */,
-				FAA3D2840F139D2E00B2447E /* 02de-contents.xml */,
+				FAA3D2820F139D2E00B2447E /* 01ngircd-contents.xml */,
 				FAA3D2850F139D2E00B2447E /* 02de.xml */,
-				FAA3D2860F139D2E00B2447E /* index.xml */,
-				FAA3D2880F139D2E00B2447E /* Makefile.am */,
+				FAA3D2840F139D2E00B2447E /* 02de-contents.xml */,
 			);
 			path = ngIRCd.pmdoc;
 			sourceTree = "<group>";

+ 2 - 1
contrib/Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@ EXTRA_DIST = README \
 	ngIRCd-Logo.gif \
 	ngircd-redhat.init \
 	ngircd.service \
+	ngircd.socket \
 	ngircd.spec \
 	platformtest.sh \
 	systrace.policy

+ 2 - 1
contrib/Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -208,6 +208,7 @@ EXTRA_DIST = README \
 	ngIRCd-Logo.gif \
 	ngircd-redhat.init \
 	ngircd.service \
+	ngircd.socket \
 	ngircd.spec \
 	platformtest.sh \
 	systrace.policy

+ 11 - 2
contrib/README

@@ -2,18 +2,21 @@
                      ngIRCd - Next Generation IRC Server
                            http://ngircd.barton.de/
 
-               (c)2001-2011 Alexander Barton and Contributors.
+               (c)2001-2013 Alexander Barton and Contributors.
                ngIRCd is free software and published under the
                    terms of the GNU General Public License.
 
-                            -- Contributions --
+                             -- Contributions --
 
 
 Debian/
  - Various files for building Debian GNU/Linux packages (".deb's").
+	- ngircd.init; ngircd.default: init script for Debian-based systems.
+	- ngircd.pam: example PAM configuraton.
 
 MacOSX/
  - Project files for XCode, the "project builder" of Apple Mac OS X.
+	- de.barton.ngircd.plist[.tmpl]: launchd(8) property list.
 
 ngindent
  - Script to indent the code of ngIRCd in the "standard way".
@@ -24,6 +27,12 @@ ngircd-bsd.sh
 ngircd-redhat.init
  - Start/stop script for RedHat-based distributions (like CentOS).
 
+ngircd.service
+ - systemd(8) service unit configuration file.
+
+ngircd.socket
+ - systemd(8) socket unit configuration file for "socket activation".
+
 ngircd.spec
  - RPM "spec" file.
 

+ 2 - 2
contrib/ngircd.service

@@ -3,8 +3,8 @@ Description=Next Generation IRC Daemon
 After=network.target
 
 [Service]
-# don't daemonize to simplify stuff
-ExecStart=/usr/sbin/ngircd -n
+Type=forking
+ExecStart=/usr/sbin/ngircd
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]

+ 11 - 0
contrib/ngircd.socket

@@ -0,0 +1,11 @@
+[Unit]
+Description=Next Generation IRC Daemon (Socket)
+
+[Socket]
+BindIPv6Only=ipv6-only
+ListenStream=0.0.0.0:6667
+#ListenStream=[::]:6667
+IPTOS=low-delay
+
+[Install]
+WantedBy=sockets.target

+ 1 - 1
contrib/ngircd.spec

@@ -1,5 +1,5 @@
 %define name    ngircd
-%define version 20.3
+%define version 21
 %define release 1
 %define prefix  %{_prefix}
 

+ 41 - 18
contrib/platformtest.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -54,6 +54,16 @@ if [ $? -ne 0 ]; then
 	cd ..
 fi
 
+echo "$NAME: Checking for GIT tree ..."
+if [ -d .git ]; then
+	echo "$NAME: Checking for \"git\" command ..."
+	git version >/dev/null 2>&1
+	if [ $? -eq 0 ]; then
+		echo "$NAME: Running \"git clean\" ..."
+		[ -n "$VERBOSE" ] && git clean -dxf || git clean -dxf >/dev/null
+	fi
+fi
+
 echo "$NAME: Checking for \"./configure\" script ..."
 if [ ! -e ./configure ]; then
 	echo "$NAME: Running \"./autogen.sh\" ..."
@@ -99,6 +109,7 @@ if [ -r "Makefile" ]; then
 	CC=$(grep "^CC = " Makefile | cut -d' ' -f3)
 	$CC --version 2>&1 | grep -i "GCC" >/dev/null
 	if [ $? -eq 0 ]; then
+		# GCC, or compiler that mimics GCC
 		$CC --version 2>&1 | grep -i "Open64" >/dev/null
 		if [ $? -eq 0 ]; then
 			COMPILER="Open64"
@@ -108,12 +119,24 @@ if [ -r "Makefile" ]; then
 			COMPILER="gcc $COMPILER"
 		fi
 	else
-		case "$CC" in
-		  gcc*)
+		# Non-GCC compiler
+		$CC --version 2>&1 | grep -i "clang" >/dev/null
+		if [ $? -eq 0 ]; then
+			COMPILER=$($CC --version 2>/dev/null | head -1 \
+			  | cut -d'(' -f1 | cut -d'-' -f1 \
+			  | sed -e 's/version //g' | sed -e 's/Apple /A-/g' \
+			  | sed -e 's/Debian //g' | sed -e 's/LLVM /clang /g')
+		fi
+		$CC -version 2>&1 | grep -i "tcc" >/dev/null
+		if [ $? -eq 0 ]; then
+			COMPILER=$($CC -version 2>/dev/null | head -1 \
+			  | cut -d'(' -f1 | sed -e 's/version //g')
+		fi
+		if [ "$COMPILER" = "unknown" ]; then
 			v="`$CC --version 2>/dev/null | head -1`"
-			[ -n "$v" ] && COMPILER="gcc $v"
-			;;
-		esac
+			[ -z "$v" ] && v="`$CC -version 2>/dev/null | head -1`"
+			[ -n "$v" ] && COMPILER="$v"
+		fi
 	fi
 fi
 
@@ -128,14 +151,14 @@ esac
 
 # Get IO interface information
 if [ "$OS" = "linux-gnu" ]; then
-	COMMENT="(1)"
+	COMMENT="1"
 else
 	grep "^#define HAVE_SYS_DEVPOLL_H 1" src/config.h >/dev/null 2>&1
-	[ $? -eq 0 ] && COMMENT="(4)"
+	[ $? -eq 0 ] && COMMENT="4"
 	grep "^#define HAVE_EPOLL_CREATE 1" src/config.h >/dev/null 2>&1
-	[ $? -eq 0 ] && COMMENT="(5)"
+	[ $? -eq 0 ] && COMMENT="5"
 	grep "^#define HAVE_KQUEUE 1" src/config.h >/dev/null 2>&1
-	[ $? -eq 0 ] && COMMENT="(3)"
+	[ $? -eq 0 ] && COMMENT="3"
 fi
 
 [ -n "$R_CONFIGURE" ] && C="Y" || C="N"
@@ -145,16 +168,16 @@ fi
 [ -n "$COMMENT" ] && COMMENT=" $COMMENT"
 
 echo
-echo "                              the executable works (\"runs\") as expected --+"
-echo "                                tests run successfully (\"make check\") --+ |"
-echo "                                           ngIRCd compiles (\"make\") --+ | |"
-echo "                                                ./configure works --+ | | |"
-echo "                                                                    | | | |"
-echo "Platform                    Compiler     ngIRCd     Date     Tester C M T R See"
-echo "--------------------------- ------------ ---------- -------- ------ - - - - ---"
+echo "                                the executable works (\"runs\") as expected --+"
+echo "                                  tests run successfully (\"make check\") --+ |"
+echo "                                             ngIRCd compiles (\"make\") --+ | |"
+echo "                                                  ./configure works --+ | | |"
+echo "                                                                      | | | |"
+echo "Platform                    Compiler     ngIRCd     Date     Tester   C M T R *"
+echo "--------------------------- ------------ ---------- -------- -------- - - - - -"
 type printf >/dev/null 2>&1
 if [ $? -eq 0 ]; then
-	printf "%-27s %-12s %-10s %s %-6s %s %s %s %s%s" \
+	printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s" \
 	 "$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$USER" \
 	 "$C" "$M" "$T" "$R" "$COMMENT"
 else

+ 991 - 0
doc/Commands.txt

@@ -0,0 +1,991 @@
+
+                     ngIRCd - Next Generation IRC Server
+                           http://ngircd.barton.de/
+
+               (c)2001-2013 Alexander Barton and Contributors.
+               ngIRCd is free software and published under the
+                   terms of the GNU General Public License.
+
+                              -- Commands.txt --
+
+
+This file lists all commands available on ngIRCd. It is written in a format
+that is human readable as well as machine parseable and therefore can be used
+as "help text file" of the daemon.
+
+In short, the daemon reads this file on startup and parses it as following
+when an user issues a "HELP <cmd>" command:
+
+ 1. Search the file for a line "- <cmd>",
+ 2. Output all subsequent lines that start with a TAB (ASCII 9) character
+    to the client using NOTICE commands, treat lines containing a single "."
+    after the TAB as empty lines.
+ 3. Break at the first line not starting with a TAB character.
+
+This format allows to have information to each command stored in this file
+which will not be sent to an IRC user requesting help which enables us to
+have additional annotations stored here which further describe the origin,
+implementation details, or limits of the specific command which are not
+relevant to an end-user but administrators and developers.
+
+A special "Intro" block is returned to the user when the HELP command is
+used without a command name:
+
+
+- Intro
+	This is ngIRCd, a server software for Internet Relay Chat (IRC)
+	networks. You can find more information about ngIRCd on its homepage:
+		<http://ngircd.barton.de>
+	.
+	Use "HELP COMMANDS" to get a list of all available commands and
+	"HELP <command-name>" to get help for a specific IRC command, for
+	example "HELP quit" or "HELP privmsg".
+
+
+Connection Handling Commands
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- CAP
+	CAP LS
+	CAP LIST
+	CAP REQ <capabilities>
+	CAP ACK <capabilities>
+	CAP NAK <capabilities>
+	CAP CLEAR
+	CAP END
+	.
+	List, request, and clear "IRC Capabilities".
+	.
+	Using this command, an IRC client can request additional "IRC
+	capabilities" during login or later on, which influences the
+	communication between server and client. Normally, these commands
+	aren't directly used by humans, but automatically by their client
+	software. And please note that issuing such commands manually can
+	irritate the client software used, because of the "non-standard"
+	behavior of the server!
+	.
+	- CAP LS: list all available capabilities.
+	- CAP LIST: list active capabilities of this connection.
+	- CAP REQ: Request particular capabilities.
+	- CAP ACK: Acknowledge a set of capabilities to be enabled/disabled.
+	- CAP NAK: Reject a set of capabilities.
+	- CAP CLEAR: Clear all set capabilities.
+	- CAP END: Indicate end of capability negotiation during login,
+	  ignored in an fully registered session.
+
+	Please note that the <capabilities> must be given in a single
+	parameter but whitespace separated, therefore a command could look
+	like this: "CAP REQ :capability1 capability2 capability3" for example.
+
+	References:
+	 - <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
+	 - <http://ngircd.barton.de/doc/Capabilities.txt>
+	 - doc/Capabilities.txt
+
+- CHARCONV
+	CHARCONV <client-charset>
+	.
+	Set client character set encoding to <client-charset>.
+	.
+	After receiving such a command, the server translates all message
+	data received from the client using the set <client-charset> to the
+	server encoding (UTF-8), and all message data which is to be sent to
+	the client from the server encoding (UTF-8) to <client-charset>.
+	.
+	This enables older clients and clients using "strange" character sets
+	to transparently participate in channels and direct messages to
+	clients using UTF-8, which should be the default today.
+
+	References:
+	 - IRC+, <http://ngircd.barton.de/doc/Protocol.txt>
+	 - IRC+, doc/Protocol.txt
+
+- NICK
+	NICK <nickname>
+	NICK <nickname> [<hops>]
+	NICK <nickname> <hops> <username> <host> <servertoken> <usermodes> <realname>
+	.
+	Set or change the <nickname> of a client (first form) and register
+	remote clients (second and third form; servers only).
+
+	References:
+	 - RFC 1459, 4.1.2 "Nick message" (old client and server protocol)
+	 - RFC 2812, 3.1.2 "Nick message" (client protocol)
+	 - RFC 2813, 4.1.3 "Nick" (server protocol)
+
+- PASS
+	PASS <password>
+	PASS <password> <version> <flags> [<options>]
+	.
+	Set a connection <password>. This command must be the first command
+	sent to the server, even before the NICK/USER or SERVER commands.
+	.
+	The first form is used by user sessions or (old) RFC 1459 servers,
+	the second form is used by RFC 2812 or IRC+ compliant servers and
+	enables the server to indicate its version and supported protocol
+	features.
+
+	References:
+	 - RFC 1459, 4.1.1 "Password message" (old client and server protocol)
+	 - RFC 2812, 3.1.1 "Password message" (client protocol)
+	 - RFC 2813, 4.1.1 "Password message" (server protocol)
+	 - IRC+, <http://ngircd.barton.de/doc/Protocol.txt>
+	 - IRC+, doc/Protocol.txt
+
+- PING
+	PING <token> [<target>]
+	.
+	Tests the presence of a connection to a client or server.
+	.
+	If no <target> has been given, the local server is used. User clients
+	can only use other servers as <target>, no user clients.
+	.
+	A PING message results in a PONG reply containing the <token>, which
+	can be arbitrary text.
+
+	Please note:
+	The RFCs state that the <token> parameter is used to specify the
+	origin of the PING command when forwarded in the network, but this
+	is not the case: the sender is specified using the prefix as usual,
+	and the parameter is used to identify the PONG reply in practice.
+
+	References:
+	 - RFC 2812, 3.7.2 "Ping message"
+
+- PONG
+	PONG <target> [<token>]
+	.
+	Reply to a "PING" command, indicate that the connection is alive.
+	.
+	The <token> is the arbitrary text received in the "PING" command and
+	can be used to identify the correct PONG sent as answer.
+	.
+	When the "PONG" command is received from a user session, the <target>
+	parameter is ignored; otherwise the PONG is forwarded to this client.
+
+	References:
+	 - RFC 2812, 3.7.3 "Pong message"
+
+- QUIT
+	QUIT [<quit-message>]
+	.
+	Terminate a user session.
+	.
+	When received from a user, the server acknowledges this by sending
+	an "ERROR" message back to the client and terminates the connection.
+	.
+	When a <quit-message> has been given, it is sent to all the channels
+	that the client is a member of when leaving.
+
+	References:
+	 - RFC 2812, 3.1.7 "Quit"
+	 - RFC 2813, 4.1.5 "Quit"
+
+- USER
+	USER <username> <hostname> <unused> <realname>
+	.
+	Register (and authenticate) a new user session with a short <username>
+	and a human-readable <realname>.
+	.
+	The parameter <hostname> is only used when received by an other server
+	and ignored otherwise; and the parameter <unused> is always ignored.
+	But both parameters are required on each invocation by the protocol
+	and can be set to arbitrary characters/text when not used.
+	.
+	If <username> contains an "@" character, the full <username> is used
+	for authentication, but only the first part up to this character is
+	set as "user name" for this session.
+
+	References:
+	 - RFC 2812, 3.1.3 "User message"
+
+- WEBIRC
+	WEBIRC <password> <username> <hostname> <ip-address>
+	.
+	Allow Web-to-IRC gateway software (for example) to set the correct
+	user name and host name of users instead of their own.
+	.
+	It must be the very first command sent to the server, even before
+	USER and NICK commands!
+	.
+	The <password> must be set in the server configuration file to prevent
+	unauthorized clients to fake their identity; it is an arbitrary string.
+
+	References:
+	 - IRC+, <http://ngircd.barton.de/doc/Protocol.txt>
+	 - IRC+, doc/Protocol.txt
+
+
+General Commands
+~~~~~~~~~~~~~~~~
+
+- AWAY
+	AWAY [<message>]
+	.
+	Provides the server with a message to automatically send in reply to a
+	PRIVMSG directed at the user, but not to a channel they are on.
+	.
+	If <message> is omitted, the away status is removed.
+
+	References:
+	 - RFC 2812, 4.1 "Away"
+
+- HELP
+	HELP [<command>]
+	.
+	Show help information for a specific IRC <command>. The <command> name
+	is case-insensitive.
+	.
+	Use the command "HELP Commands" to get a list of all available commands.
+
+	The HELP command isn't specified by any RFC but implemented by most
+	daemons. If no help text could be read in, ngIRCd outputs a list of all
+	implemented commands when receiving a plain "HELP" command as well as
+	on "HELP Commands".
+
+	ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other
+	implementations are using numerics 704, 705, and 706.
+
+- MODE
+	MODE <nickname> [{+|-}<mode>[<mode>] [{+|-}<mode>[<mode>] [...]]]
+	MODE <channel> [{+|-}<mode>[<mode>] [<arg> [<arg> [...]]] [{+|-}<mode>[<mode>] [<arg> [<arg> [...]]] [...]]]
+	.
+	Set and get user and channel modes.
+	.
+	When no mode parameters are given, the currently set user or channel
+	modes are returned. Otherwise the modes are adjusted accordingly
+	and the changes will be reported back to the client.
+	.
+	All user and channel "modes" are indicated by single case-sensitive
+	characters.
+	.
+	Please note that a user can only get and set his own modes, and not
+	all user "levels" are allowed to change all channel modes ...
+	.
+	The mode parameters can become quite complex, especially when dealing
+	with channel modes that require additional arguments:
+	.
+	  {+|-}<mode(s}>  -- set or unset one or more modes.
+	  +<mode(s)> -<mode(s)>  -- set some modes and unset others.
+	  +<modes> <arg1> <arg2>  -- set (at least) two modes with arguments.
+	.
+	Some examples:
+	.
+	  MODE nick +i  -- set user to "invisible".
+	  MODE #chan +tn  -- set "topic lock" and "no external messages".
+	  MODE #chan -t +l 50  -- remove "topic lock", set "user limit" to 50.
+	  MODE #chan +ov nick1 nick2  -- set "channel op" and "voice" mode
+	                                 to nick1 and nick2 in channel #chan.
+	.
+	A complete list of all modes supported by ngIRCd can be found online
+	here: <http://ngircd.barton.de/doc/Modes.txt>.
+
+	References:
+	 - RFC 2811, 4. "Channel Modes"
+	 - RFC 2812, 3.1.5 "User mode message"
+	 - RFC 2812, 3.2.3 "Channel mode message"
+	 - <http://ngircd.barton.de/doc/Modes.txt>
+	 - doc/Modes.txt
+
+- NOTICE
+	NOTICE <target>[,<target>[,...]] <message>
+	.
+	Send a <message> to a given <target>, which can be a user or a
+	channel, but DON'T report any error.
+	.
+	The "NOTICE" command exactly behaves like the "PRIVMSG" command, but
+	doesn't report any errors it encounters (like an unknown <target>).
+	Please see the help text of the "PRIVMSG" command for a detailed
+	description of the parameters!
+
+	References:
+	 - RFC 2812, 2.3.1 "Message format in Augmented BNF"
+	 - RFC 2812, 3.3 "Sending messages"
+	 - RFC 2812, 3.3.2 "Notice"
+
+- PRIVMSG
+	PRIVMSG <target>[,<target>[,...]] <message>
+	.
+	Send a <message> to a given <target>, which can be a user or a
+	channel, and report all errors.
+	.
+	The <target> must follow one of these syntax variants:
+	.
+	 - <nickname>
+	 - <channel>
+	 - <user>[%<host>]@<server>
+	 - <user>%<host>
+	 - <nickname>!<user>@<host>
+	.
+	If the <target> is a user, a private message is sent directly to this
+	user; if it resolves to a channel name, a public message is sent
+	to all the members of that channel.
+	.
+	In addition, IRC Ops can use these two forms to specify the <target>:
+	.
+	 - #<hostmask>
+	 - #<servermask>
+	.
+	The <mask> can contain the wildcard characters "*" and "?", but must
+	contain at least one dot (".") and no wildcard after the last one.
+	Then, the <message> is sent to all users matching this <mask>.
+	.
+	All warnings and errors are reported back to the initiator using
+	numeric status codes, which is the only difference to the "NOTICE"
+	command, which doesn't report back any errors or warnings at all.
+	.
+	Please note that clients often use "MSG" as an alias to PRIVMSG, and
+	a command "QUERY <nick> [<message>]" to initiate private chats. Both
+	are command extensions of the client and never sent to the server.
+
+	References:
+	 - RFC 2812, 2.3.1 "Message format in Augmented BNF"
+	 - RFC 2812, 3.3 "Sending messages"
+	 - RFC 2812, 3.3.1 "Private messages"
+
+Status and Informational Commands
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ADMIN
+	ADMIN [<target>]
+	.
+	Show administrative information about an IRC server in the network.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.4.9 "Admin command"
+
+- INFO
+	INFO [<target>]
+	.
+	Show the version, birth & online time of an IRC server in the network.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.4.10 "Info command"
+
+- ISON
+	ISON <nickname> [<nickname> [...]]
+	.
+	Query online status of a list of nicknames. The server replies with
+	a list only containing nicknames actually connected to a server in
+	the network. If no nicknames of the given list are online, an empty
+	list is returned to the client requesting the information.
+
+	Please note that "all" IRC daemons even parse separate nicknames in
+	a single parameter (like ":nick1 nick2"), and therefore ngIRCd
+	implements this behaviour, too.
+
+	References:
+	 - RFC 2812, 4.9 "Ison message"
+
+- LINKS
+	LINKS [[<target>] [<mask>]
+	.
+	List all servers currently registered in the network matching <mask>,
+	or all servers if <mask> has been omitted, as seen by the server
+	specified by <target> or the local server when <target> is omitted.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+
+	References:
+	 - RFC 2812, 3.4.5 "Links message"
+
+- LUSERS
+	LUSERS [<mask> [<target>]]
+	.
+	Return statistics about the number of clients (users, servers,
+	services, ...) in the network as seen by the server <target>.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	Please note that ngIRCd ignores the <mask> parameter entirely: it
+	is not possible to get information for a part of the network only.
+
+	References:
+	 - RFC 2812, 3.4.2 "Lusers message"
+
+- MOTD
+	MOTD [<target>]
+	.
+	Show the "Message of the Day" (MOTD) of an IRC server in the network.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.4.1 "Motd message"
+
+- NAMES
+	NAMES [<channel>[,<channel>[,...]] [<target>]]
+	.
+	Show the list of users that are members of a particular <channel>
+	(and that are visible for the client requesting this information) as
+	seen by the server <target>. More than one <channel> can be given
+	separated by "," (but not whitespaces!).
+	.
+	If <channel> has been omitted, all visible users are shown, grouped
+	by channel name, and all visible users not being members of at least
+	one channel are shown as members of the pseudo channel "*".
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.2.5 "Names message"
+
+- STATS
+	STATS [<query> [<target>]]
+	.
+	Show statistics and other information of type <query> of a particular
+	IRC server in the network.
+	.
+	The following <query> types are supported (case-insensitive where
+	applicable):
+	.
+	 - g  Network-wide bans ("G-Lines").
+	 - k  Server-local bans ("K-Lines").
+	 - L  Link status (servers and user links).
+	 - l  Link status (servers and own link).
+	 - m  Command usage count.
+	 - u  Server uptime.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+	.
+	To use "STATS L" the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 3.4.4 "Stats message"
+
+- TIME
+	TIME [<target>]
+	.
+	Show the local time of an IRC server in the network.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References
+	 - RFC 2812, 3.4.6 "Time message"
+
+- TRACE
+	TRACE [<target>]
+	.
+	Find the route to a specific server and send information about its
+	peers. Each server that processes this command reports back to the
+	sender about it: the replies from pass-through servers form a chain
+	which shows the route to the destination.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.4.8 "Trace message"
+
+- USERHOST
+	USERHOST <nickname> [<nickname> [...]]
+	.
+	Show flags and the hostmasks (<user>@<host>) of the <nickname>s,
+	separated by spaces. The following flags are used:
+	.
+	 - "-"  The client is "away" (the mode "+a" is set on this client).
+	 - "+"  Client seems to be available, at least it isn't marked "away".
+	 - "*"  The client is an IRC operator (the mode "+o" is set).
+
+	References:
+	 - RFC 2812, 4.8 "Userhost message"
+
+- VERSION
+	VERSION [<target>]
+	.
+	Show version information about a particular IRC server in the network.
+	.
+	<target> can be a server name, the nickname of a client connected to
+	a specific server, or a mask matching a server name in the network.
+	The server of the current connection is used when <target> is omitted.
+	.
+	Please note: in normal operation, the version number ends in a dot
+	(".", for example "ngIRCd-20.1."). If it ends in ".1" (for example
+	"ngIRCd-20.1.1", same version than before!), the server is running in
+	debug-mode; and if it ends in ".2", the "network sniffer" is active!
+	Keep your privacy in mind ...
+
+	References:
+	 - RFC 2812, 3.4.3 "Version message"
+
+- WHO
+	WHO [<mask> ["o"]]
+	.
+	Show a list of users who match the <mask>, or all visible users when
+	the <mask> has been omitted. (Special case: the <mask> "0" is
+	equivalent to "*")
+	.
+	If the flag "o" is given, the server will only return information about
+	IRC Operators.
+
+	References:
+	 - RFC 2812, 3.6.1 "Who query"
+
+- WHOIS
+	WHOIS [<target>] <mask>[,<mask>[,...]]
+	.
+	Query information about users matching the <mask> parameter(s) as seen
+	by the server <target>; up to 3 <masks> are supported.
+	.
+	<target> can be a server name, the nickname of a client connected to a
+	specific server, or a mask matching a server name in the network. The
+	server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.6.2 "Whois query"
+
+- WHOWAS
+	WHOWAS <nickname>[,<nickname>[,...]] [<count> [<target>]]
+	.
+	Query information about nicknames no longer in use in the network,
+	either because of nickname changes or disconnects. The history is
+	searched backwards, returning the most recent entry first. If there
+	are multiple entries, up to <count> entries will be shown (or all of
+	them, if no <count> has been given).
+	.
+	<target> can be a server name, the nickname of a client connected to a
+	specific server, or a mask matching a server name in the network. The
+	server of the current connection is used when <target> is omitted.
+
+	References:
+	 - RFC 2812, 3.6.3 "Whowas"
+
+
+Channel Commands
+~~~~~~~~~~~~~~~~
+
+- INVITE
+	INVITE <nickname> <channel>
+	.
+	Invite <nickname> to join channel <channel>.
+	.
+	<channel> does not have to exist, but if it does, only members of the
+	channel are allowed to invite other users. If the channel mode "+i"
+	is set, only channel "half-ops" (and above) may invite other clients,
+	and if channel mode "+V" is set, nobody can invite other users.
+
+	References:
+	 - RFC 2812, 3.2.7 "Invite message"
+
+- JOIN
+	JOIN {<channel>[,<channel>[,...]] [<key>[,<key>[,...]]] | 0}
+	.
+	Makes the client join the <channel> (comma-separated list), specifying
+	the channel keys ("passwords"). A <channel-key> is only needed if the
+	<channel> has the mode "+k" set.
+	.
+	If the channel(s) do not exist, then they will be created.
+	.
+	Using "JOIN 0" parts all channels at once.
+
+	References:
+	 - RFC 2812, 3.2.1 "Join message" (client protocol)
+	 - RFC 2813, 4.2.1 "Join message" (server protocol)
+
+- KICK
+	KICK <channel>[,<channel>[,...]] <nickname>[,<nickname>[,...]] [<reason>]
+	.
+	Remove users(s) with <nickname>(s) from <channel>(s).
+	.
+	There must be either exactly one <channel> parameter and multiple
+	<nickname> parameters, or as many <channel> parameters as there are
+	<nickname> parameters. The <reason> is shown to the users being
+	kicked, and the nickname of the current user is used when <reason>
+	is omitted.
+
+	References:
+	 - RFC 2812, 3.2.8 "Kick command"
+
+- LIST
+	LIST [<channel>[,<channel>[,...]] [<server>]]
+	.
+	List all visible <channels> (comma-separated list).
+	.
+	If <server> is given, the command will be forwarded to <server> for
+	evaluation.
+
+	References:
+	 - RFC 2812, 3.2.6 "List message"
+
+- PART
+	PART <channel>[,<channel>[,...]] [<part-message>]
+	.
+	Leave <channel> (comma-separated list), optionally with sending a
+	<part-message> to all the other channel members.
+
+	References:
+	 - RFC 2812, 3.2.2 "Part message"
+
+- TOPIC
+	TOPIC <channel> [<topic>]
+	.
+	Change or view the topic of a channel.
+	.
+	The topic for channel <channel> is returned if there is no <topic>
+	given. If the <topic> parameter is present, the topic for that
+	channel will be changed, if this action is allowed for the user
+	requesting it. If the <topic> parameter is an empty string, the
+	topic for that channel will be removed.
+
+	References:
+	 - RFC 2812, 3.2.4 "Topic message"
+
+
+Administrative Commands
+~~~~~~~~~~~~~~~~~~~~~~~
+
+- CONNECT
+	CONNECT <server> [<port> [<remote-server> [<my-pwd> <peer-pwd>]]]
+	.
+	Instructs the current server, or <remote-server> if specified,
+	to connect to the server named <server>, which must be configured
+	in the server configuration file.
+	.
+	To use this command, the user must be an IRC Operator. To establish
+	a connection on a <remote-server>, you must have remote IRC operator
+	privileges.
+	.
+	If <port>, <my-pwd> and <peer-pwd> are given, these values override
+	the ones specified in the server configuration file.
+
+	References:
+	 - RFC 2812, 3.4.7 "Connect message"
+
+- DIE
+	DIE [<message>]
+	.
+	Instructs the server to shut down.
+	.
+	The optional (and non-standard) <message> text is sent to each client
+	connected to this server before all connections are closed.
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 4.3 "Die message"
+
+- DISCONNECT
+	DISCONNECT <server>
+	.
+	Disconnect and disable a locally linked server.
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - This command is not specified in the IRC RFCs, it is an extension
+	   of ngIRCd.
+
+- GLINE
+	GLINE <nick!user@hostmask> [<timeout> :<reason>]
+	.
+	This command provides timed G-Lines (network-wide bans).
+	.
+	If a client matches a G-Line, it cannot connect to any server on
+	the IRC network for <timeout> seconds. When <timeout> is 0, it make
+	the G-Line permanent.
+	.
+	If no <timeout> and no <reason> is given, the G-Line is removed.
+	.
+	To use this command, the user must be an IRC Operator.
+	.
+	"STATS g" can be used to list all currently active G-Lines.
+
+	References:
+	 - This command is not specified in the IRC RFCs, it is an extension
+	   of ngIRCd.
+
+- KILL
+	KILL <nickname> <reason>
+	.
+	Forcibly remove all users with a given <nickname> from the IRC
+	network and display the given <reason> to them.
+	.
+	This command is used internally between servers, too, for example
+	to disconnect duplicate <nickname>'s after a "net split".
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 3.7.1 "Kill message"
+
+- KLINE
+	KLINE <nick!user@hostmask> [<timeout> :<reason>]
+	.
+	This command provides timed K-Lines (server-local bans).
+	.
+	If a client matches a K-Line, it cannot connect to this server for
+	<timeout> seconds. When <timeout> is 0, it makes the K-Line permanent.
+	.
+	If no <timeout> and no <reason> is given, the K-Line is removed.
+	.
+	To use this command, the user must be an IRC Operator.
+	.
+	"STATS k" can be used to list all currently active K-Lines.
+
+	References:
+	 - This command is not specified in the IRC RFCs, it is an extension
+	   of ngIRCd.
+
+- OPER
+	OPER <name> <password>
+	.
+	Authenticates a user named <name> as an IRC operator on the current
+	server/network.
+	.
+	This operator <name> must be configured in the server configuration.
+	.
+	Please note that <name> is NOT related to a nickname at all!
+
+	References:
+	 - RFC 2812, 3.1.4 "Oper message"
+
+- REHASH
+	REHASH
+	.
+	Causes the server to re-read and re-process its configuration file(s).
+	.
+	While rehashing, no new connections are accepted, but all already
+	established connections stay connected.
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 4.2 "Rehash message"
+
+- RESTART
+	RESTART
+	.
+	Restart the server.
+	.
+	While restarting, all connections are reset and no new connections
+	are accepted.
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 4.4 "Restart message"
+
+- WALLOPS
+	WALLOPS <message>
+	.
+	Sends <message> to all users with user mode "+w".
+	.
+	To use this command, the user must be an IRC Operator.
+
+	References:
+	 - RFC 2812, 4.7 "Operwall message"
+
+IRC Service Commands
+~~~~~~~~~~~~~~~~~~~~
+
+- SERVICE
+	SERVICE <name> <reserved1> <distribution> <type> <reserved2> <info>
+	SERVICE <name> <servertoken> <distribution> {<type>|+<modes>} <hops> <info>
+	.
+	Register a new service in the network.
+	.
+	The first form is used by directly linked services and isn't supported
+	by ngIRCd at the moment. The second form announces services connected
+	to remote "pseudo-servers" ("services hubs").
+	.
+	The <distribution> and <type> parameters are ignored by ngIRCd.
+
+	References:
+	 - RFC 2812, 3.1.6 "Service message"
+	 - RFC 2813, 4.1.4 "Service message"
+
+- SERVLIST
+	SERVLIST [<mask> [<type>]]
+	.
+	List all IRC services currently registered in the network.
+	.