Browse Source

Import upstream version 20

Alexander Barton 8 years ago
parent
commit
3610f8bac1
100 changed files with 4344 additions and 3814 deletions
  1. 4 0
      .mailmap
  2. 165 6
      ChangeLog
  3. 16 4
      INSTALL
  4. 8 6
      Makefile.am
  5. 9 13
      Makefile.in
  6. 90 5
      NEWS
  7. 9 6
      README
  8. 0 12
      aclocal.m4
  9. 214 0
      autogen.sh
  10. 12 5
      config.guess
  11. 18 5
      config.sub
  12. 695 397
      configure
  13. 156 85
      configure.in
  14. 722 0
      configure.ng
  15. 0 495
      contrib/Anope/0001-Revert-Removed-ngircd.patch
  16. 0 59
      contrib/Anope/0002-ngircd-whitespace-fixes.patch
  17. 0 127
      contrib/Anope/0003-Update-ngIRCd-protocol-module-for-current-Anope-1.9.patch
  18. 0 92
      contrib/Anope/0004-ngircd-Do-PING-PONG-on-server-burst-to-sync-servers.patch
  19. 0 28
      contrib/Anope/0005-ngircd-always-prefix-modes-in-CHANINFO-with.patch
  20. 0 46
      contrib/Anope/0006-ngircd-support-user-mode-R-and-channel-mode-R.patch
  21. 0 95
      contrib/Anope/0007-ngircd-Fix-handling-of-JOIN-commands.patch
  22. 0 37
      contrib/Anope/0008-ngircd-Allow-setting-modes-by-clients-on-burst.patch
  23. 0 142
      contrib/Anope/0009-ngircd-Update-protocol-module-for-current-Anope-1.9.patch
  24. 0 56
      contrib/Anope/0010-ngircd-Add-ProtongIRCd.patch
  25. 0 28
      contrib/Anope/0011-ngircd-Update-protocol-module-for-current-Anope-1.9.patch
  26. 0 24
      contrib/Anope/0012-ngircd-Channel-mode-r-is-supported-now.patch
  27. 0 27
      contrib/Anope/0013-ngircd-Update-copyright-notice.patch
  28. 0 34
      contrib/Anope/0014-ngircd-set-unset-GLINE-s-on-AKILL-commands.patch
  29. 0 26
      contrib/Anope/0015-ngircd-ngIRCd-supports-channel-mode-e-now.patch
  30. 0 34
      contrib/Anope/0016-ngircd-support-SQUERY-command.patch
  31. 0 34
      contrib/Anope/Makefile.am
  32. 0 375
      contrib/Anope/Makefile.in
  33. 0 35
      contrib/Anope/README
  34. 1 6
      contrib/Debian/Makefile.in
  35. 18 0
      contrib/Debian/changelog
  36. 16 16
      contrib/Debian/control
  37. 5 3
      contrib/Debian/rules
  38. 1 6
      contrib/MacOSX/Makefile.in
  39. 10 2
      contrib/MacOSX/config.h
  40. 1 6
      contrib/MacOSX/ngIRCd.pmdoc/Makefile.in
  41. 1 6
      contrib/MacOSX/ngIRCd.xcodeproj/Makefile.in
  42. 36 11
      contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
  43. 11 4
      contrib/Makefile.am
  44. 12 10
      contrib/Makefile.in
  45. 0 3
      contrib/README
  46. 11 0
      contrib/ngircd.service
  47. 6 6
      contrib/ngircd.spec
  48. 6 6
      contrib/platformtest.sh
  49. 54 0
      doc/Contributing.txt
  50. 1 1
      doc/HowToRelease.txt
  51. 24 3
      doc/Makefile.am
  52. 25 9
      doc/Makefile.in
  53. 12 1
      doc/Modes.txt
  54. 8 5
      doc/Platforms.txt
  55. 75 4
      doc/Protocol.txt
  56. 60 39
      doc/Services.txt
  57. 22 12
      doc/sample-ngircd.conf.tmpl
  58. 1 6
      doc/src/Makefile.in
  59. 1 1
      man/Makefile.am
  60. 2 7
      man/Makefile.in
  61. 17 12
      man/ngircd.8.tmpl
  62. 24 23
      man/ngircd.conf.5.tmpl
  63. 1 6
      src/Makefile.in
  64. 89 34
      src/config.h.in
  65. 10 3
      src/ipaddr/Makefile.am
  66. 25 29
      src/ipaddr/Makefile.in
  67. 21 0
      src/ipaddr/Makefile.ng
  68. 0 36
      src/ipaddr/ansi2knr.1
  69. 0 739
      src/ipaddr/ansi2knr.c
  70. 12 4
      src/ngircd/Makefile.am
  71. 49 23
      src/ngircd/Makefile.in
  72. 152 0
      src/ngircd/Makefile.ng
  73. 89 77
      src/ngircd/channel.c
  74. 95 36
      src/ngircd/client.c
  75. 8 5
      src/ngircd/client.h
  76. 4 8
      src/ngircd/conf-ssl.h
  77. 84 18
      src/ngircd/conf.c
  78. 17 7
      src/ngircd/conf.h
  79. 192 0
      src/ngircd/conn-encoding.c
  80. 30 0
      src/ngircd/conn-encoding.h
  81. 23 5
      src/ngircd/conn-ssl.c
  82. 110 34
      src/ngircd/conn.c
  83. 18 1
      src/ngircd/conn.h
  84. 15 11
      src/ngircd/defines.h
  85. 14 0
      src/ngircd/io.c
  86. 2 2
      src/ngircd/irc-cap.c
  87. 30 17
      src/ngircd/irc-channel.c
  88. 68 0
      src/ngircd/irc-encoding.c
  89. 24 0
      src/ngircd/irc-encoding.h
  90. 87 45
      src/ngircd/irc-info.c
  91. 107 45
      src/ngircd/irc-login.c
  92. 2 1
      src/ngircd/irc-login.h
  93. 109 0
      src/ngircd/irc-metadata.c
  94. 24 0
      src/ngircd/irc-metadata.h
  95. 149 40
      src/ngircd/irc-mode.c
  96. 10 2
      src/ngircd/irc-op.c
  97. 2 0
      src/ngircd/irc-oper.c
  98. 61 34
      src/ngircd/irc-server.c
  99. 32 6
      src/ngircd/irc.c
  100. 0 0
      src/ngircd/lists.c

+ 4 - 0
.mailmap

@@ -0,0 +1,4 @@
+# mailmap file for git-[short]log and git-blame
+
+Alexander Barton <anonymous>
+Ali Shemiran <ashemira@ucsd.edu>

+ 165 - 6
ChangeLog

@@ -9,6 +9,165 @@
                                -- ChangeLog --
 
 
+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.
+    Patch suggested by Brett Smith <brett@w3.org>, see
+    <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>.
+
+  ngIRCd 20~rc2 (2012-12-02)
+  - Rework cloaked hostname handling and implement the "METADATA cloakhost"
+    subcommand: Now ngIRCd uses two fields internally, one to store the
+    "real" hostname and one to save the "cloaked" hostname. This allows
+    "foreign servers" (aka "IRC services") to alter the real and cloaked
+    hostnames of clients without problems, even when the user itself issues
+    additional "MODE +x" and "MODE -x" commands.
+  - RPL_UMODEIS: send correct target name, even on server links.
+  - Update platformtest.sh to follow autoconf changes and only generate
+    the "configure" script when it is missing.
+  - Fix the test suite to correctly execute test scripts even when stdout
+    is redirected.
+  - Fix some compiler warnings on NetBSD and OpenBSD.
+
+  ngIRCd 20~rc1 (2012-11-11)
+  - Update doc/Services.txt: describe the upcoming version of Anope 1.9.8,
+    then including a protocol module for ngIRCd. And remove our own patches
+    in ./contrib/Anope because they aren't supported any more ...
+  - Implement new "METADATA" command which can be used by remote servers
+    and IRC services to update client metadata like the client info text
+    ("real name"), user name, and hostname, and use this command to
+    configure an cloaked hostname (user mode "+x") on remote servers:
+    This prevents "double cloaking" of hostnames and even cloaked
+    hostnames are in sync on all servers supporting "METADATA" now.
+  - Fix error message when trying to join non-predefined channels and the
+    "PredefChannelsOnly" configuration option is set.
+  - Implement new IRC "SVSNICK" command to allow remote servers (and IRC
+    services) to change nicknames of already registered users. The SVSNICK
+    command itself doesn't change the nickname, but it becomes forwarded
+    to the server to which the user is connected to. And then this server
+    initiates the real nickname changing using regular NICK commands.
+    This allows to run mixed networks with old servers not supporting the
+    SVSNICK command, because SVSNICK commands for nicknames on such servers
+    are silently ignored and don't cause a desynchronization of the network.
+  - Make server reconnect time a little bit more random, so that two
+    servers trying to connect to each other asynchronously don't try this
+    in exactly the same time periods and kick each other off ...
+  - Don't accept connections for servers already being linked: there was a
+    time frame that could result in one connection overwriting the other,
+    e. g. the incoming connection overwriting the status of the outgoing
+    one. And this could lead to all kind of weirdness (even crashes!) later
+    on: now such incoming connections are dropped.
+  - New configuration option "MaxListSize" to configure the maximum number
+    of channels returned by a LIST command. The default is 100, as before.
+  - Implement user mode "b", "block messages": when a user has set mode "b",
+    all private messages and notices to this user are blocked if they don't
+    originate from a registered user, an IRC Op, server or service. The
+    originator gets an error numeric sent back in this case,
+    ERR_NONONREG_MSG (486), which is used by UnrealIRCd, too. (Closes #144)
+  - WHOIS: Not only show RPL_WHOISHOST_MSG to local IRC operators, but show
+    it to all IRC operators in the network. And don't show it to anybody if
+    the "more privacy" configuration option is enabled. (Closes #134)
+  - Test suite: make expect scripts more verbose displaying dots for each
+    reply of the server that it is waiting for.
+  - WHOIS: Implement numeric RPL_WHOISMODES_MSG (379) and show user modes in
+    the reply of the WHOIS command for the user himself or, if MorePrivacy
+    isn't set, for request initiated by an IRC operator. (Closes #129)
+  - Implement channel mode "V" (invite disallow): If the new channel mode
+    "V" is set, the INVITE command becomes invalid and all clients get the
+    new ERR_NOINVITE_MSG (518) reply. (Closes #143)
+  - KICK-protect IRC services.
+  - Implement channel mode "Q" and user mode "q": Both modes protect users
+    from channel kicks: only IRC operators and servers can kick users having
+    mode "q" or in channels with mode "Q". (Closes #141)
+  - Debian: require "telnet" or "telnet-ssl" for building and enable
+    CHARCONV in ngircd-full[-dbg] variants.
+  - Send RPL_REHASHING (382) numeric if a REHASH command was accepted.
+  - Fix spelling and variable names in some log messages.
+  - Allow users to "cloak" their hostname only when the configuration
+    variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only
+    IRC operators, other servers, and services are allowed to set the user
+    mode "+x": this prevents regular users from changing their hostmask to
+    the name of the IRC server itself, which confused quite a few people ;-)
+    (Closes #133)
+  - New configuration option "OperChanPAutoOp": If disabled, IRC operators
+    don't become channel operators in persistent channels when joining.
+    Enabled by default, which has been the behavior of ngIRCd up to this
+    patch. (Closes #135)
+  - Allow IRC operators to see secret (+s) channels in LIST command as long
+    as the "MorePrivacy" configuration option isn't enabled in the
+    configuration file. (Closes #136)
+  - Enhance build system: Support new (>=1.12) and old (<=1.11) GNU automake
+    versions, update checks for required and optional features, enable
+    colored test output of automake (if available), rename configure.in to
+    more modern configure.ac, include .mailmap and all build-system files in
+    distribution archives and no longer require a GIT tree to detect the
+    correct version string.
+  - Update documentation: add doc/Contributing.txt and include version
+    numbers in doc/Modes.txt.
+  - Free all listen ports on initialization: now listen ports can be
+    reconfigured on runtime using a configuration reload.
+  - Initialize SSL when needed only, and disable SSL on errors.
+  - Implement new (optional) IRC+ "CHARCONV" command to set a client
+    character set that the server translates all messages to/from UTF-8.
+    This feature requires the "libiconv" library and must be enabled using
+    the new "--with-iconv" option of the ./configure script. See
+    doc/Protocol.txt for details. (Closes #109)
+  - Allow limited punctuation in usernames, for better PAM integration.
+  - Correctly re-initialize signal handlers on RESTART commands.
+  - Show a warning on startup if the configuration file is not a full path:
+    ngIRCd is a long-running process and changes its working directory to
+    "/" to not block mounted filesystems and the like when running as daemon
+    ("not in the foreground"); therefore the path to the configuration file
+    must be relative to "/" (or the chroot() directory), which basically is
+    "not relative", to ensure that "kill -HUP" and the "REHASH" command work
+    as expected later on. (Closes #127)
+  - Make the "&SERVER" channel definable in a [Channel] configuration block,
+    which enables server operators to overwrite the built-in topic and
+    channel modes. (Closes #131)
+  - Don't limit list size of "WHO #channel" commands, because it makes no
+    sense to not return all the users in that channel, so I removed the
+    check. But if there are more than MAX_RPL_WHO(25) replies, the client
+    requesting the list will be "penalized" one second more, then 2 in
+    total. (Closes #125)
+  - Make ngIRCd buildable using the kqueue() IO interface on FreeBSD 4.x.
+  - Fix the "NoticeAuth" configuration option when using SSL connections and
+    enhance the message to show the hostname and IDENT reply of the client.
+  - Introduce numeric RPL_HOSTHIDDEN_MSG (396): This numeric is sent to the
+    client each time it changes its displayed hostname using "MODE +/-x",
+    and if "CloakHost" is set right after the MOTD has been sent.
+  - Fix USERHOST not displaying the correctly cloaked hostname.
+  - Implement user mode "B" ("Bot flag"): it is settable and unsettable by
+    every (non-restricted) client. This is how Unreal and InspIRCd do
+    behave, and so do we :-)
+  - Dynamically allocate memory for connection passwords: This a) saves
+    memory for clients not using passwords at all and b) allows for
+    "arbitrarily" long passwords.
+  - Implement channel mode "M": Only the server, identified users and IRC
+    operators are able to talk in such a channel.
+  - Block nicknames that are reserved for services and are defined using the
+    configuration variable "ServiceMask" in "Server" blocks; And this
+    variable now can handle more than one mask separated by commas.
+  - Now "make uninstall" removes the installed "ngircd.conf" file, if it is
+    still equal to our "sample-ngircd.conf" file and therefore hasn't been
+    modified by the user. If it has been modified, it isn't removed and a
+    notice is displayed to the user. And "make install" now displays a
+    message when no ngircd.conf file exists and the "sample-ngircd.conf"
+    file will be installed as a starting point.
+  - Add contrib/ngircd.service, a systemd service file for ngircd.
+  - Implemented XOP channel user modes: "Half Op" ("+h", prefix "%") can set
+    the channel modes +imntvIbek and kick all +v and normal users; "Admin"
+    ("+a", prefix "&") can set channel modes +imntvIbekoRsz and kick all +o,
+    +h, +v and normal users; and "Owner" ("+q", prefix "~") can set channel
+    modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users.
+  - Implement hashed cloaked hostnames for both the "CloakHost" and
+    "CloakHostModeX" configuration options: now the admin can use the new
+    '%x' placeholder to insert a hashed version of the clients hostname,
+    and the new configuration option "CloakHostSalt" defines the salt for
+    the hash function. When "CloakHostSalt" is not set (the default), a
+    random salt will be generated after each server restart. (Closes #133)
+
 ngIRCd Release 19.2 (2012-06-19)
 
   - doc/Capabilities.txt: document "multi-prefix" capability
@@ -82,7 +241,7 @@ ngIRCd Release 19 (2012-02-29)
     and receiver are on the same channel. This prevents private flooding
     by completely unknown clients.
   - New RPL_WHOISREGNICK_MSG(307) numeric in WHOIS command replies: it
-    indicates if a nick name is registered (if user mode 'R' set).
+    indicates if a nickname is registered (if user mode 'R' set).
   - Limit channel invite, ban, and exception lists to 50 entries and fix
     duplicate check and error messages when adding already listed entries
     or deleting no (longer) existing ones.
@@ -123,7 +282,7 @@ ngIRCd Release 19 (2012-02-29)
     limit reached), but report an error and continue. And don't check
     the channel limit and don't report with "too many channels" when
     trying to join a channel that the client already is a member of.
-  - ISON command: reply with the correct upper-/lowercase nick names.
+  - ISON command: reply with the correct upper-/lowercase nicknames.
   - New configuration option "PAMIsOptional": when set, clients not
     sending a password are still allowed to connect: they won't become
     "identified" and keep the "~" character prepended to their supplied
@@ -170,7 +329,7 @@ ngIRCd Release 19 (2012-02-29)
     The bug has been introduced starting with ngIRCd 17 ... :-(
     (commit ID 6ebb31ab35e)
   - Added doc/Modes.txt: document modes supported by ngIRCd.
-  - Implement user mode "R": indicates that the nick name of this user
+  - Implement user mode "R": indicates that the nickname of this user
     is "registered". This mode isn't handled by ngIRCd itself, but must
     be set and unset by IRC services like Anope.
   - Implement channel mode "R": only registered users (having the user
@@ -188,7 +347,7 @@ ngIRCd Release 19 (2012-02-29)
   - Handle channel user modes 'a', 'h', and 'q' from remote servers.
     These channel user modes aren't used for anything at the moment,
     but ngIRCd knows that these three modes are "channel user modes"
-    and not "channel modes", that is that these modes take an "nick name"
+    and not "channel modes", that is that these modes take an "nickname"
     argument. Like unknown user and channel modes, these modes are saved
     and forwarded to other servers, but ignored otherwise.
   - Correctly inform clients when other servers change their user modes.
@@ -275,7 +434,7 @@ ngIRCd Release 18 (2011-07-10)
   - New configuration option "CloakHost": when set, this host name is used for
     every client instead of the real DNS host name (or IP address).
   - New configuration option "CloakUserToNick": when enabled, ngIRCd sets
-    every clients' user name to their nick name and hides the user name
+    every clients' user name to their nickname and hides the user name
     supplied by the IRC client.
   - doc/Protocol.txt: Update description of the CHANINFO and WEBIRC commands.
   - Doxygen'ify (document) much more source files; code cleanup ...
@@ -607,7 +766,7 @@ ngIRCd 0.11.0 (2008-01-15)
   - New [Server] configuration Option "Bind" allows to specify
     the source IP address to use when connecting to remote server.
   - New configuration option "MaxNickLength" to specify the allowed maximum
-    length of user nick names. Note: must be unique in an IRC network!
+    length of user nicknames. Note: must be unique in an IRC network!
   - Enhanced the IRC+ protocol to support an enhanced "server handshake" and
     enable server to recognize numeric 005 (ISUPPORT) and 376 (ENDOFMOTD).
     See doc/Protocol.txt for details.

+ 16 - 4
INSTALL

@@ -12,6 +12,14 @@
 I. Upgrade Information
 ~~~~~~~~~~~~~~~~~~~~~~
 
+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
+  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 ;-)
+
 Differences to version 17
 
 - Support for ZeroConf/Bonjour/Rendezvous service registration has been
@@ -149,10 +157,14 @@ This step is therefore only interesting for developers.
 
 autogen.sh produces the Makefile.in's, which are necessary for the configure
 script itself, and some more files for make. To run autogen.sh you'll need
-GNU autoconf and GNU automake (use recent versions! autoconf 2.53 and
-automake 1.6.1 are known to work).
-
-Again: "end users" do not need this step!
+GNU autoconf and GNU automake: at least autoconf 2.61 and automake 1.10 are
+requird, newer is better. But don't use automake 1.12 or newer for creating
+distribution archives: it will work but lack "de-ANSI-fucation" support in the
+generated Makefile's! Stick with automake 1.11.x for this purpose ...
+So automake 1.11.x and autoconf 2.67+ is recommended.
+
+Again: "end users" do not need this step and neither need GNU autoconf nor GNU
+automake at all!
 
 
 2): "./configure"

+ 8 - 6
Makefile.am

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2012 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
@@ -13,24 +13,26 @@ AUTOMAKE_OPTIONS = gnu
 
 SUBDIRS = doc src man contrib
 
+EXTRA_DIST = autogen.sh configure.ng .mailmap
+
 clean-local:
 	rm -f build-stamp*
 	rm -rf ngircd.dest
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
-	rm -f Makefile.in Makefile aclocal.m4 configure
-	rm -f mkinstalldirs missing depcomp install-sh
+	rm -f Makefile.in Makefile aclocal.m4 configure configure.ac
+	rm -f ar-lib mkinstalldirs missing depcomp install-sh
 	rm -f config.log debian
 
 testsuite:
-	make -C src/testsuite check
+	cd src/testsuite && make check
 
 lint:
-	make -C src/ngircd lint
+	cd src/ngircd && make lint
 
 srcdoc:
-	make -C doc srcdoc
+	cd doc && make srcdoc
 
 have-xcodebuild:
 	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \

+ 9 - 13
Makefile.in

@@ -17,7 +17,7 @@
 
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2012 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
@@ -44,14 +44,13 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-target_triplet = @target@
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
 	ChangeLog INSTALL NEWS config.guess config.sub depcomp \
 	install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -213,16 +212,13 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
-target = @target@
 target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = gnu
 SUBDIRS = doc src man contrib
+EXTRA_DIST = autogen.sh configure.ng .mailmap
 all: all-recursive
 
 .SUFFIXES:
@@ -516,7 +512,7 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
@@ -697,18 +693,18 @@ clean-local:
 
 maintainer-clean-local:
 	rm -rf autom4te.cache
-	rm -f Makefile.in Makefile aclocal.m4 configure
-	rm -f mkinstalldirs missing depcomp install-sh
+	rm -f Makefile.in Makefile aclocal.m4 configure configure.ac
+	rm -f ar-lib mkinstalldirs missing depcomp install-sh
 	rm -f config.log debian
 
 testsuite:
-	make -C src/testsuite check
+	cd src/testsuite && make check
 
 lint:
-	make -C src/ngircd lint
+	cd src/ngircd && make lint
 
 srcdoc:
-	make -C doc srcdoc
+	cd doc && make srcdoc
 
 have-xcodebuild:
 	@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \

+ 90 - 5
NEWS

@@ -9,6 +9,91 @@
                                   -- NEWS --
 
 
+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.
+    Patch suggested by Brett Smith <brett@w3.org>, see
+    <http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>.
+
+  ngIRCd 20~rc2 (2012-12-02)
+  - Rework cloaked hostname handling and implement the "METADATA cloakhost"
+    subcommand: Now ngIRCd uses two fields internally, one to store the
+    "real" hostname and one to save the "cloaked" hostname. This allows
+    "foreign servers" (aka "IRC services") to alter the real and cloaked
+    hostnames of clients without problems, even when the user itself issues
+    additional "MODE +x" and "MODE -x" commands.
+
+  ngIRCd 20~rc1 (2012-11-11)
+  - Update doc/Services.txt: describe the upcoming version of Anope 1.9.8,
+    then including a protocol module for ngIRCd. And remove our own patches
+    in ./contrib/Anope because they aren't supported any more ...
+  - Implement new "METADATA" command which can be used by remote servers
+    and IRC services to update client metadata like the client info text
+    ("real name"), user name, and hostname, and use this command to
+    configure an cloaked hostname (user mode "+x") on remote servers:
+    This prevents "double cloaking" of hostnames and even cloaked
+    hostnames are in sync on all servers supporting "METADATA" now.
+  - Implement new IRC "SVSNICK" command to allow remote servers (and IRC
+    services) to change nicknames of already registered users. The SVSNICK
+    command itself doesn't change the nickname, but it becomes forwarded
+    to the server to which the user is connected to. And then this server
+    initiates the real nickname changing using regular NICK commands.
+    This allows to run mixed networks with old servers not supporting the
+    SVSNICK command, because SVSNICK commands for nicknames on such servers
+    are silently ignored and don't cause a desynchronization of the network.
+  - New configuration option "MaxListSize" to configure the maximum number
+    of channels returned by a LIST command. The default is 100, as before.
+  - Implement user mode "b", "block messages": when a user has set mode "b",
+    all private messages and notices to this user are blocked if they don't
+    originate from a registered user, an IRC Op, server or service. The
+    originator gets an error numeric sent back in this case,
+    ERR_NONONREG_MSG (486), which is used by UnrealIRCd, too. (Closes #144)
+  - Implement channel mode "V" (invite disallow): If the new channel mode
+    "V" is set, the INVITE command becomes invalid and all clients get the
+    new ERR_NOINVITE_MSG (518) reply. (Closes #143)
+  - Implement channel mode "Q" and user mode "q": Both modes protect users
+    from channel kicks: only IRC operators and servers can kick users having
+    mode "q" or in channels with mode "Q". (Closes #141)
+  - Allow users to "cloak" their hostname only when the configuration
+    variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only
+    IRC operators, other servers, and services are allowed to set the user
+    mode "+x": this prevents regular users from changing their hostmask to
+    the name of the IRC server itself, which confused quite a few people ;-)
+    (Closes #133)
+  - New configuration option "OperChanPAutoOp": If disabled, IRC operators
+    don't become channel operators in persistent channels when joining.
+    Enabled by default, which has been the behavior of ngIRCd up to this
+    patch. (Closes #135)
+  - Allow IRC operators to see secret (+s) channels in LIST command as long
+    as the "MorePrivacy" configuration option isn't enabled in the
+    configuration file. (Closes #136)
+  - Implement new (optional) IRC+ "CHARCONV" command to set a client
+    character set that the server translates all messages to/from UTF-8.
+    This feature requires the "libiconv" library and must be enabled using
+    the new "--with-iconv" option of the ./configure script. See
+    doc/Protocol.txt for details. (Closes #109)
+  - Implement user mode "B" ("Bot flag"): it is settable and unsettable by
+    every (non-restricted) client. This is how Unreal and InspIRCd do
+    behave, and so do we :-)
+  - Implement channel mode "M": Only the server, identified users and IRC
+    operators are able to talk in such a channel.
+  - Block nicknames that are reserved for services and are defined using the
+    configuration variable "ServiceMask" in "Server" blocks; And this
+    variable now can handle more than one mask separated by commas.
+  - Implemented XOP channel user modes: "Half Op" ("+h", prefix "%") can set
+    the channel modes +imntvIbek and kick all +v and normal users; "Admin"
+    ("+a", prefix "&") can set channel modes +imntvIbekoRsz and kick all +o,
+    +h, +v and normal users; and "Owner" ("+q", prefix "~") can set channel
+    modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users.
+  - Implement hashed cloaked hostnames for both the "CloakHost" and
+    "CloakHostModeX" configuration options: now the admin can use the new
+    '%x' placeholder to insert a hashed version of the clients hostname,
+    and the new configuration option "CloakHostSalt" defines the salt for
+    the hash function. When "CloakHostSalt" is not set (the default), a
+    random salt will be generated after each server restart.
+
 ngIRCd Release 19.2 (2012-06-19)
 
   ngIRCd 19.2~rc1 (2012-06-13)
@@ -43,7 +128,7 @@ ngIRCd Release 19 (2012-02-29)
     and receiver are on the same channel. This prevents private flooding
     by completely unknown clients.
   - New RPL_WHOISREGNICK_MSG(307) numeric in WHOIS command replies: it
-    indicates if a nick name is registered (if user mode 'R' set).
+    indicates if a nickname is registered (if user mode 'R' set).
   - Limit channel invite, ban, and exception lists to 50 entries and fix
     duplicate check and error messages when adding already listed entries
     or deleting no (longer) existing ones.
@@ -79,7 +164,7 @@ ngIRCd Release 19 (2012-02-29)
     NICK, and USER commands have been processed) and before the child
     processes for authentication are forked, so resource usage is smaller.
   - Added doc/Modes.txt: document modes supported by ngIRCd.
-  - Implement user mode "R": indicates that the nick name of this user
+  - Implement user mode "R": indicates that the nickname of this user
     is "registered". This mode isn't handled by ngIRCd itself, but must
     be set and unset by IRC services like Anope.
   - Implement channel mode "R": only registered users (having the user
@@ -90,7 +175,7 @@ ngIRCd Release 19 (2012-02-29)
   - Handle channel user modes 'a', 'h', and 'q' from remote servers.
     These channel user modes aren't used for anything at the moment,
     but ngIRCd knows that these three modes are "channel user modes"
-    and not "channel modes", that is that these modes take an "nick name"
+    and not "channel modes", that is that these modes take an "nickname"
     argument. Like unknown user and channel modes, these modes are saved
     and forwarded to other servers, but ignored otherwise.
 
@@ -149,7 +234,7 @@ ngIRCd Release 18 (2011-07-10)
   - New configuration option "CloakHost": when set, this host name is used for
     every client instead of the real DNS host name (or IP address).
   - New configuration option "CloakUserToNick": when enabled, ngIRCd sets
-    every clients' user name to their nick name and hides the user name
+    every clients' user name to their nickname and hides the user name
     supplied by the IRC client.
   - Make write buffers bigger, but flush early. Before this change, a client
     got disconnected if the buffer flushing at 4k failed, now regular clients
@@ -317,7 +402,7 @@ ngIRCd 0.11.0 (2008-01-15)
   - New [Server] configuration Option "Bind" allows to specify
     the source IP address to use when connecting to remote server.
   - New configuration option "MaxNickLength" to specify the allowed maximum
-    length of user nick names. Note: must be unique in an IRC network!
+    length of user nicknames. Note: must be unique in an IRC network!
   - Numeric 317: implemented "signon time" (displayed in WHOIS result).
   - Added new server configuration option "Passive" for "Server" blocks to
     disable automatic outgoing connections (similar to -p option to ngircd,

+ 9 - 6
README

@@ -12,12 +12,15 @@
 I. Introduction
 ~~~~~~~~~~~~~~~
 
-ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
-is developed and published under the terms of the GNU General Public
-Licence, see the file COPYING for details. ngIRCd means "next generation
-IRC daemon" (which is a little bit exaggerated, "lightweight Internet Relay
-Chat server" would be better), it's written from scratch and not deduced
-from the "grandfather of IRC daemons", the daemon of the IRCNet.
+ngIRCd is a free, portable and lightweight Internet Relay Chat server for
+small or private networks, developed under the GNU General Public License
+(GPL; please see the file COPYING for details). It is simple to configure,
+can cope with dynamic IP addresses, and supports IPv6 as well as SSL. It is
+written from scratch and not based on the original IRCd.
+
+The name ngIRCd means next generation IRC daemon, which is a little bit
+exaggerated: lightweight Internet Relay Chat server most probably would be a
+better name :-)
 
 Please see the INSTALL document for installation and upgrade information!
 

+ 0 - 12
aclocal.m4

@@ -406,18 +406,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,

+ 214 - 0
autogen.sh

@@ -0,0 +1,214 @@
+#!/bin/sh
+#
+# ngIRCd -- The Next Generation IRC Daemon
+# Copyright (c)2001-2012 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# Please read the file COPYING, README and AUTHORS for more information.
+#
+# Usage:
+#   [VAR=<value>] ./autogen.sh [<configure-args>]
+#
+# This script generates the ./configure script using GNU automake and
+# GNU autoconf. It tries to be smart in finding the correct/usable/available
+# installed versions of these tools on your system.
+#
+# In addition, it enables or disables the "de-ANSI-fication" support of GNU
+# automake, which is supported up to autoconf 1.11.x an has been removed
+# in automake 1.12 -- make sure to use a version of automake supporting it
+# when generating distribution archives!
+#
+# The following strategy is used for each of aclocal, autoheader, automake,
+# and autoconf: first, "tool" (the regular name of the tool, e. g. "autoconf"
+# or "automake") is checked. If this fails, "tool<major><minor>" (for example
+# "automake16") and "tool-<major>.<minor>" (e. g. "autoconf-2.54") are tried
+# with <major> being 2 for tool of GNU autoconf and 1 for tools of automake;
+# <minor> is tried from 99 to 0. The first occurrence will be used.
+#
+# When you pass <configure-args> to autogen.sh it will call the generated
+# ./configure script on success and pass these parameters to it.
+#
+# You can tweak the behaviour using these environment variables:
+#
+# - ACLOCAL=<cmd>, AUTOHEADER=<cmd>, AUTOMAKE=<cmd>, AUTOCONF=<cmd>
+#   Name and optionally path to the particular tool.
+# - PREFIX=<path>
+#   Search the GNU autoconf and GNU automake tools in <path> first. If the
+#   generated ./configure script will be called, pass "--prefix=<path>" to it.
+# - EXIST=<tool>
+#   Use <tool> to test for aclocal, autoheader etc. pp. ...
+#   When not specified, either "type" or "which" is used.
+# - VERBOSE=1
+#   Output the detected names of the GNU automake and GNU autoconf tools.
+# - GO=1
+#   Call ./configure even if no arguments have been passed to autogen.sh.
+#
+# Examples:
+#
+# - ./autogen.sh
+#   Generates the ./configure script.
+# - GO=1 ./autogen.sh
+#   Generates the ./configure script and runs it as "./configure".
+# - VERBOSE=1 ./autogen.sh --with-ident
+#   Show tool names, generates the ./configure script, and runs it with
+#   these arguments: "./configure --with-ident".
+# - ACLOCAL=aclocal-1.6 GO=1 PREFIX=$HOME ./autogen.sh
+#   Uses "aclocal-1.6" as aclocal tool, generates the ./configure script,
+#   and runs it with these arguments: "./configure --prefix=$HOME".
+#
+
+Search()
+{
+	[ $# -eq 2 ] || exit 1
+
+	searchlist="$1"
+	major="$2"
+	minor=99
+
+	[ -n "$PREFIX" ] && searchlist="${PREFIX}/$1 ${PREFIX}/bin/$1 $searchlist"
+
+	for name in $searchlist; do
+		$EXIST "${name}" >/dev/null 2>&1
+		if [ $? -eq 0 ]; then
+			echo "${name}"
+			return 0
+		fi
+	done
+
+	while [ $minor -ge 0 ]; do
+		for name in $searchlist; do
+			$EXIST "${name}${major}${minor}" >/dev/null 2>&1
+			if [ $? -eq 0 ]; then
+				echo "${name}${major}${minor}"
+				return 0
+			fi
+			$EXIST "${name}-${major}.${minor}" >/dev/null 2>&1
+			if [ $? -eq 0 ]; then
+				echo "${name}-${major}.${minor}"
+				return 0
+			fi
+		done
+		minor=`expr $minor - 1`
+	done
+	return 1
+}
+
+Notfound()
+{
+	echo "Error: $* not found!"
+	echo "Please install recent versions of GNU autoconf and GNU automake."
+	exit 1
+}
+
+Run()
+{
+	[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
+	$@
+}
+
+# Reset locale settings to suppress warning messages of Perl
+unset LC_ALL
+unset LANG
+
+# Which command should be used to detect the automake/autoconf tools?
+[ -z "$EXIST" ] && existlist="type which" || existlist="$EXIST"
+EXIST=""
+for t in $existlist; do
+	$t /bin/ls >/dev/null 2>&1
+	if [ $? -eq 0 ]; then
+		rm -f /tmp/test.$$
+		$t /tmp/test.$$ >/dev/null 2>&1
+		[ $? -ne 0 ] && EXIST="$t"
+	fi
+	[ -n "$EXIST" ] && break
+done
+if [ -z "$EXIST" ]; then
+	echo "Didn't detect a working command to test for the autoconf/automake tools!"
+	echo "Searchlist: $existlist"
+	exit 1
+fi
+[ "$VERBOSE" = "1" ] && echo "Using \"$EXIST\" to test for tools."
+
+# Try to detect the needed tools when no environment variable already
+# specifies one:
+echo "Searching for required tools ..."
+[ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
+[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
+[ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
+[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
+[ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
+[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
+[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
+[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
+
+[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
+[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
+
+# Verify that all tools have been found
+[ -z "$ACLOCAL" ] && Notfound aclocal
+[ -z "$AUTOHEADER" ] && Notfound autoheader
+[ -z "$AUTOMAKE" ] && Notfound automake
+[ -z "$AUTOCONF" ] && Notfound autoconf
+
+AM_VERSION=`$AUTOMAKE --version|head -n 1|egrep -o "([1-9]\.[0-9]+(\.[0-9]+)*)"`
+ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
+AM_MAJOR="$1"; AM_MINOR="$2"; AM_PATCHLEVEL="$3"
+
+AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
+
+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) ..."
+	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) ..."
+	sed -e "s|^__ng_PROTOTYPES__|AC_C_PROTOTYPES|g" configure.ng >configure.ac
+	DEANSI_START="#"
+	DEANSI_END="	# disabled by ./autogen.sh script"
+fi
+sed -e "s|^__ng_Makefile_am_template__|${DEANSI_START}AUTOMAKE_OPTIONS = ansi2knr${DEANSI_END}|g" \
+	src/portab/Makefile.ng >src/portab/Makefile.am
+for makefile_ng in $AM_MAKEFILES; do
+	makefile_am=`echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g"`
+	sed -e "s|^__ng_Makefile_am_template__|${DEANSI_START}AUTOMAKE_OPTIONS = ../portab/ansi2knr${DEANSI_END}|g" \
+		$makefile_ng >$makefile_am
+done
+
+export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
+
+# Generate files
+echo "Generating files using GNU $AUTOCONF and $AUTOMAKE ..."
+Run $ACLOCAL && \
+	Run $AUTOCONF && \
+	Run $AUTOHEADER && \
+	Run $AUTOMAKE --add-missing --no-force
+
+if [ $? -eq 0 -a -x ./configure ]; then
+	# Success: if we got some parameters we call ./configure and pass
+	# all of them to it.
+	NAME=`grep PACKAGE_STRING= configure | cut -d"'" -f2`
+	if [ "$GO" = "1" ]; then
+		[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
+		c="./configure${p}${CONFIGURE_ARGS}"
+		echo "Okay, autogen.sh for $NAME done."
+		echo "Calling \"$c\" ..."
+		$c
+		exit $?
+	else
+		echo "Okay, autogen.sh for $NAME done."
+		echo "Now run the \"./configure\" script."
+		exit 0
+	fi
+else
+	# Failure!?
+	echo "Error! Check your installation of GNU automake and autoconf!"
+	exit 1
+fi
+
+# -eof-

+ 12 - 5
config.guess

@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-14'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -801,6 +805,9 @@ EOF
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
@@ -1201,6 +1208,9 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1256,7 +1266,7 @@ EOF
     NEO-?:NONSTOP_KERNEL:*:*)
 	echo neo-tandem-nsk${UNAME_RELEASE}
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1340,6 @@ EOF
 	exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_

+ 18 - 5
config.sub

@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -123,7 +123,7 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
@@ -225,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -785,6 +791,10 @@ case $basic_machine in
 	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -1346,15 +1356,15 @@ case $os in
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1537,6 +1547,9 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	hexagon-*)
+		os=-elf
+		;;
 	tic54x-*)
 		os=-coff
 		;;

File diff suppressed because it is too large
+ 695 - 397
configure


+ 156 - 85
configure.in

@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors
+# Copyright (c)2001-2012 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
@@ -9,46 +9,60 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
-define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \\n))
+define(VERSION_ID,esyscmd([
+	V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`;
+	[ -z "$V" -a -r configure ] \
+		&& V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2`
+	( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n';
+]))
+
+m4_ifdef([AM_SILENT_RULES],
+	[m4_define([ng_color_tests], [color-tests])],
+	[m4_define([ng_color_tests], [])])
 
 # -- Initialisation --
 
-AC_PREREQ(2.50)
-AC_INIT(ngircd, VERSION_ID)
-AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
-AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(1.6)
-AM_CONFIG_HEADER(src/config.h)
+AC_PREREQ([2.61])
+AC_INIT([ngIRCd], VERSION_ID,
+	[ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
+
+AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
+AC_CONFIG_HEADER([src/config.h])
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE([-Wall 1.10 ]ng_color_tests)
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # -- Templates for config.h --
 
 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
+AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
 AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
+AH_TEMPLATE([ICONV], [Define if libiconv can be used, e.g. for CHARCONV])
+AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
+AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
+AH_TEMPLATE([PAM], [Define if PAM should be used])
 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
 AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
-AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
-AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
-AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
-AH_TEMPLATE([PAM], [Define if PAM should be used])
-AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
+AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 
-AH_TEMPLATE([TARGET_OS], [Target operating system name])
-AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
-AH_TEMPLATE([TARGET_CPU], [Target CPU name])
+AH_TEMPLATE([HOST_OS], [Target operating system name])
+AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
+AH_TEMPLATE([HOST_CPU], [Target CPU name])
 
 # -- C Compiler --
 
 AC_PROG_CC
 AC_PROG_CC_STDC
-AC_C_PROTOTYPES
 
 # -- Helper programs --
 
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
 AC_PROG_AWK
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -57,9 +71,9 @@ AC_PROG_RANLIB
 
 # -- Compiler Features --
 
-AM_C_PROTOTYPES
 AC_C_CONST
 AC_C_INLINE
+AM_C_PROTOTYPES
 
 # -- Hard coded system and compiler dependencies/features/options ... --
 
@@ -85,7 +99,7 @@ if test "$GCC" = "yes"; then
 	GCC_STACK_PROTECT_CC
 fi
 
-case "$target_os" in
+case "$host_os" in
 	hpux*)
 		# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
 		# (tested with HP/UX 11.11)
@@ -101,28 +115,20 @@ CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
 # -- Headers --
 
 AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
 
+# Required header files
 AC_CHECK_HEADERS([ \
-	ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
-	stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
+	fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \
+	strings.h sys/socket.h sys/time.h unistd.h \
 	],,AC_MSG_ERROR([required C header missing!]))
 
-AC_CHECK_HEADERS([ \
-	arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
-	],[],[],[[
-	#ifdef HAVE_SYS_TYPES_H
-		#include <sys/types.h>
-	#endif
-	#ifdef HAVE_SYS_SOCKET_H
-		#include <sys/socket.h>
-	#endif
-	#ifdef HAVE_NETINET_IN_H
-		#include <netinet/in.h>
-	#endif
-	]]
-)
+# Optional header files
+AC_CHECK_HEADERS_ONCE([ \
+	arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \
+	stdint.h varargs.h \
+	])
 
 # -- Datatypes --
 
@@ -139,33 +145,50 @@ AC_TRY_COMPILE([
 	AC_MSG_RESULT(no)
 ])
 
+AC_TYPE_PID_T
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
 
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
  [#include <arpa/inet.h>])
 
 # -- Libraries --
 
-# A/UX needs this.
-AC_CHECK_LIB(UTIL,memmove)
-# needed on solaris. GNU libc also has a libnsl, but we do not need it.
-AC_SEARCH_LIBS(gethostbyname,nsl)
-AC_CHECK_LIB(socket,bind)
+# memmove: A/UX libUTIL
+AC_SEARCH_LIBS([memmove], [UTIL], [], [
+	AC_MSG_ERROR([unable to find the memmove() function])
+])
+# gethostbyname: Solaris libnsl
+AC_SEARCH_LIBS([gethostbyname], [bind nsl network], [], [
+	AC_MSG_ERROR([unable to find the gethostbyname() function])
+])
+# bind: SVR4 libsocket
+AC_SEARCH_LIBS([bind], [socket network], [], [
+	AC_MSG_ERROR([unable to find the bind() function])
+])
 
 # -- Functions --
 
 AC_FUNC_FORK
 AC_FUNC_STRFTIME
 
+# Required functions
 AC_CHECK_FUNCS([ \
-	bind gethostbyaddr gethostbyname gethostname inet_ntoa \
-	setsid setsockopt socket strcasecmp waitpid],,
+	alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
+	gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
+	strchr strcspn strerror strncasecmp strrchr strspn strstr \
+	],,
 	AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS([ \
-	gai_strerror getaddrinfo getnameinfo inet_aton sigaction \
-	sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r])
+# Optional functions
+AC_CHECK_FUNCS_ONCE([ \
+	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
+	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
 
 # -- Configuration options --
 
@@ -173,22 +196,20 @@ AC_CHECK_FUNCS([ \
 
 x_syslog_on=no
 AC_ARG_WITH(syslog,
-	[  --without-syslog        disable syslog (autodetected by default)],
+	AS_HELP_STRING([--without-syslog],
+		       [disable syslog (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
 				CPPFLAGS="-I$withval/include $CPPFLAGS"
 				LDFLAGS="-L$withval/lib $LDFLAGS"
 			fi
-			AC_CHECK_LIB(be, syslog)
-			AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
+			AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
 				AC_MSG_ERROR([Can't enable syslog!])
-			)
+			])
 		fi
 	],
-	[
-		AC_CHECK_LIB(be, syslog)
-		AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
+	[	AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
 	]
 )
 if test "$x_syslog_on" = "yes"; then
@@ -200,7 +221,8 @@ fi
 
 x_zlib_on=no
 AC_ARG_WITH(zlib,
-	[  --without-zlib          disable zlib compression (autodetected by default)],
+	AS_HELP_STRING([--without-zlib],
+		       [disable zlib compression (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -227,7 +249,8 @@ fi
 x_io_backend=none
 
 AC_ARG_WITH(select,
-	[  --without-select        disable select IO support (autodetected by default)],
+	AS_HELP_STRING([--without-select],
+		       [disable select IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -245,7 +268,8 @@ AC_ARG_WITH(select,
 )
 
 AC_ARG_WITH(poll,
-	[  --without-poll          disable poll support (autodetected by default)],
+	AS_HELP_STRING([--without-poll],
+		       [disable poll support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -271,7 +295,8 @@ AC_ARG_WITH(poll,
 )
 
 AC_ARG_WITH(devpoll,
-	[  --without-devpoll       disable /dev/poll IO support (autodetected by default)],
+	AS_HELP_STRING([--without-devpoll],
+		       [disable /dev/poll IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -288,7 +313,8 @@ AC_ARG_WITH(devpoll,
 )
 
 AC_ARG_WITH(epoll,
-	[  --without-epoll         disable epoll IO support (autodetected by default)],
+	AS_HELP_STRING([--without-epoll],
+		       [disable epoll IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -306,7 +332,8 @@ AC_ARG_WITH(epoll,
 )
 
 AC_ARG_WITH(kqueue,
-	[  --without-kqueue        disable kqueue IO support (autodetected by default)],
+	AS_HELP_STRING([--without-kqueue],
+		       [disable kqueue IO support (autodetected by default)]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -346,7 +373,8 @@ fi
 # use SSL?
 
 AC_ARG_WITH(openssl,
-	[  --with-openssl          enable SSL support using OpenSSL],
+	AS_HELP_STRING([--with-openssl],
+		       [enable SSL support using OpenSSL]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -363,7 +391,8 @@ AC_ARG_WITH(openssl,
 )
 
 AC_ARG_WITH(gnutls,
-	[  --with-gnutls           enable SSL support using gnutls],
+	AS_HELP_STRING([--with-gnutls],
+		       [enable SSL support using gnutls]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -393,7 +422,8 @@ fi
 
 x_tcpwrap_on=no
 AC_ARG_WITH(tcp-wrappers,
-	[  --with-tcp-wrappers     enable TCP wrappers support],
+	AS_HELP_STRING([--with-tcp-wrappers],
+		       [enable TCP wrappers support]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -424,7 +454,8 @@ int deny_severity = 0;
 
 x_identauth_on=no
 AC_ARG_WITH(ident,
-	[  --with-ident            enable "IDENT" ("AUTH") protocol support],
+	AS_HELP_STRING([--with-ident],
+		       [enable "IDENT" ("AUTH") protocol support]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -447,7 +478,8 @@ fi
 
 x_pam_on=no
 AC_ARG_WITH(pam,
-	[  --with-pam              enable user authentication using PAM],
+	AS_HELP_STRING([--with-pam],
+		       [enable user authentication using PAM]),
 	[	if test "$withval" != "no"; then
 			if test "$withval" != "yes"; then
 				CFLAGS="-I$withval/include $CFLAGS"
@@ -474,17 +506,42 @@ fi
 
 x_ircplus_on=yes
 AC_ARG_ENABLE(ircplus,
-	[  --disable-ircplus       disable IRC+ protocol],
+	AS_HELP_STRING([--disable-ircplus],
+		       [disable IRC+ protocol]),
 	if test "$enableval" = "no"; then x_ircplus_on=no; fi
 )
 if test "$x_ircplus_on" = "yes"; then
 	AC_DEFINE(IRCPLUS, 1)
+
+	# Compile in iconv support?
+	# We only check for it when IRC+ is enabled, because the IRC+ command
+	# CHARCONV is the only function depending on it.
+	x_iconv_on=no
+	AC_ARG_WITH(iconv,
+		[  --with-iconv            enable character conversation using libiconv],
+		[ if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(iconv, iconv_open)
+			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
+				AC_MSG_ERROR([Can't enable libiconv support!])
+			)
+		  fi
+		]
+	)
+	if test "$x_iconv_on" = "yes"; then
+		AC_DEFINE(ICONV, 1)
+	fi
 fi
 
 # enable support for IPv6?
 x_ipv6_on=no
 AC_ARG_ENABLE(ipv6,
-	[  --enable-ipv6           enable IPv6 protocol support],
+	AS_HELP_STRING([--enable-ipv6],
+		       [enable IPv6 protocol support]),
 	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
 )
 if test "$x_ipv6_on" = "yes"; then
@@ -500,7 +557,8 @@ fi
 
 x_sniffer_on=no; x_debug_on=no
 AC_ARG_ENABLE(sniffer,
-	[  --enable-sniffer        enable IRC traffic sniffer (enables debug mode)],
+	AS_HELP_STRING([--enable-sniffer],
+		       [enable IRC traffic sniffer (enables debug mode)]),
 	if test "$enableval" = "yes"; then
 		AC_DEFINE(SNIFFER, 1)
 		x_sniffer_on=yes; x_debug_on=yes
@@ -510,7 +568,8 @@ AC_ARG_ENABLE(sniffer,
 # enable additional debugging code?
 
 AC_ARG_ENABLE(debug,
-	[  --enable-debug          show additional debug output],
+	AS_HELP_STRING([--enable-debug],
+		       [show additional debug output]),
 	if test "$enableval" = "yes"; then x_debug_on=yes; fi
 )
 if test "$x_debug_on" = "yes"; then
@@ -523,7 +582,8 @@ fi
 
 x_strict_rfc_on=no
 AC_ARG_ENABLE(strict-rfc,
-	[  --enable-strict-rfc     strict RFC conformance -- may break clients!],
+	AS_HELP_STRING([--enable-strict-rfc],
+		       [strict RFC conformance -- may break clients!]),
 	if test "$enableval" = "yes"; then
 		AC_DEFINE(STRICT_RFC, 1)
 		x_strict_rfc_on=yes
@@ -532,9 +592,9 @@ AC_ARG_ENABLE(strict-rfc,
 
 # -- Definitions --
 
-AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
-AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
-AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
+AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
+AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
 
 # Add additional CFLAGS, eventually specified on the command line, but after
 # running this configure script. Useful for "-Werror" for example.
@@ -542,25 +602,26 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
 
 # -- Generate files --
 
-AC_OUTPUT([ \
+AC_CONFIG_FILES([ \
 	Makefile \
+	contrib/Debian/Makefile \
+	contrib/MacOSX/Makefile \
+	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
+	contrib/Makefile \
 	doc/Makefile \
 	doc/src/Makefile \
-	src/Makefile \
-	src/portab/Makefile \
+	man/Makefile \
 	src/ipaddr/Makefile \
-	src/tool/Makefile \
+	src/Makefile \
 	src/ngircd/Makefile \
+	src/portab/Makefile \
 	src/testsuite/Makefile \
-	man/Makefile \
-	contrib/Makefile \
-	contrib/Anope/Makefile \
-	contrib/Debian/Makefile \
-	contrib/MacOSX/Makefile \
-	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
-	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+	src/tool/Makefile \
 ])
 
+AC_OUTPUT
+
 type dpkg >/dev/null 2>&1
 if test $? -eq 0; then
 	# Generate debian/ link if the dpkg command exists
@@ -582,8 +643,7 @@ C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
 D=`eval echo ${docdir}` ; D=`eval echo ${D}`
 
-echo "             Target: ${target}"
-test "$target" != "$host" && echo "               Host: ${host}"
+echo "               Host: ${host}"
 echo "           Compiler: ${CC}"
 test -n "$CFLAGS"	&& echo "     Compiler flags: ${CFLAGS}"
 test -n "$CPPFLAGS"	&& echo " Preprocessor flags: ${CPPFLAGS}"
@@ -646,6 +706,17 @@ test "$x_pam_on" = "yes" \
 echo $ECHO_N "        SSL support: $ECHO_C"
 echo "$x_ssl_lib"
 
+echo $ECHO_N "   libiconv support: $ECHO_C"
+	echo "$x_iconv_on"
+
 echo
 
+if ! grep "^AUTOMAKE_OPTIONS = ../portab/ansi2knr" src/ngircd/Makefile.am >/dev/null 2>&1; then
+	echo "WARNING:"
+	echo "This GNU automake generated build system does not support \"de-ANSI-fication\","
+	echo "therefore don't use it to generate \"official\" distribution archives!"
+	echo "(Most probably you want to use GNU automake 1.11.x for this purpose ...)"
+	echo
+fi
+
 # -eof-

+ 722 - 0
configure.ng

@@ -0,0 +1,722 @@
+#
+# ngIRCd -- The Next Generation IRC Daemon
+# Copyright (c)2001-2012 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# Please read the file COPYING, README and AUTHORS for more information.
+#
+
+define(VERSION_ID,esyscmd([
+	V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`;
+	[ -z "$V" -a -r configure ] \
+		&& V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2`
+	( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n';
+]))
+
+m4_ifdef([AM_SILENT_RULES],
+	[m4_define([ng_color_tests], [color-tests])],
+	[m4_define([ng_color_tests], [])])
+
+# -- Initialisation --
+
+AC_PREREQ([2.61])
+AC_INIT([ngIRCd], VERSION_ID,
+	[ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
+
+AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
+AC_CONFIG_HEADER([src/config.h])
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE([-Wall 1.10 ]ng_color_tests)
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+# -- Templates for config.h --
+
+AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
+AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
+AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
+AH_TEMPLATE([ICONV], [Define if libiconv can be used, e.g. for CHARCONV])
+AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
+AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
+AH_TEMPLATE([PAM], [Define if PAM should be used])
+AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
+AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
+AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
+AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
+AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
+AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
+
+AH_TEMPLATE([HOST_OS], [Target operating system name])
+AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
+AH_TEMPLATE([HOST_CPU], [Target CPU name])
+
+# -- C Compiler --
+
+AC_PROG_CC
+AC_PROG_CC_STDC
+
+# -- Helper programs --
+
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
+AC_PROG_AWK
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+# -- Compiler Features --
+
+AC_C_CONST
+AC_C_INLINE
+__ng_PROTOTYPES__
+
+# -- Hard coded system and compiler dependencies/features/options ... --
+
+AC_DEFUN([GCC_STACK_PROTECT_CC],[
+  ssp_cc=yes
+  # we use -fstack-protector-all for the test to enfoce the use of the guard variable 
+  AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
+  ssp_old_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS -fstack-protector-all"
+  AC_TRY_LINK(,,, ssp_cc=no)
+  echo $ssp_cc
+  CFLAGS="$ssp_old_cflags"
+  if test "X$ssp_cc" = "Xyes"; then
+      CFLAGS="$CFLAGS -fstack-protector"
+      AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
+  fi
+])
+
+if test "$GCC" = "yes"; then
+	# We are using the GNU C compiler. Good!
+	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
+
+	GCC_STACK_PROTECT_CC
+fi
+
+case "$host_os" in
+	hpux*)
+		# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
+		# (tested with HP/UX 11.11)
+		CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
+		;;
+esac
+
+# Add additional CFLAGS, eventually specified on the command line:
+test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
+
+CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
+
+# -- Headers --
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
+
+# Required header files
+AC_CHECK_HEADERS([ \
+	fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \
+	strings.h sys/socket.h sys/time.h unistd.h \
+	],,AC_MSG_ERROR([required C header missing!]))
+
+# Optional header files
+AC_CHECK_HEADERS_ONCE([ \
+	arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \
+	stdint.h varargs.h \
+	])
+
+# -- Datatypes --
+
+AC_MSG_CHECKING(whether socklen_t exists)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+	],[
+	socklen_t a, b;
+	a = 2; b = 4; a += b;
+	],[
+	AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
+	],[
+	AC_MSG_RESULT(no)
+])
+
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
+
+AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
+ [#include <arpa/inet.h>])
+
+# -- Libraries --
+
+# memmove: A/UX libUTIL
+AC_SEARCH_LIBS([memmove], [UTIL], [], [
+	AC_MSG_ERROR([unable to find the memmove() function])
+])
+# gethostbyname: Solaris libnsl
+AC_SEARCH_LIBS([gethostbyname], [bind nsl network], [], [
+	AC_MSG_ERROR([unable to find the gethostbyname() function])
+])
+# bind: SVR4 libsocket
+AC_SEARCH_LIBS([bind], [socket network], [], [
+	AC_MSG_ERROR([unable to find the bind() function])
+])
+
+# -- Functions --
+
+AC_FUNC_FORK
+AC_FUNC_STRFTIME
+
+# Required functions
+AC_CHECK_FUNCS([ \
+	alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
+	gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
+	strchr strcspn strerror strncasecmp strrchr strspn strstr \
+	],,
+	AC_MSG_ERROR([required function missing!]))
+
+# Optional functions
+AC_CHECK_FUNCS_ONCE([ \
+	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
+	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
+
+# -- Configuration options --
+
+# use syslog?
+
+x_syslog_on=no
+AC_ARG_WITH(syslog,
+	AS_HELP_STRING([--without-syslog],
+		       [disable syslog (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
+				AC_MSG_ERROR([Can't enable syslog!])
+			])
+		fi
+	],
+	[	AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
+	]
+)
+if test "$x_syslog_on" = "yes"; then
+	AC_DEFINE(SYSLOG, 1)
+	AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
+fi
+
+# use zlib compression?
+
+x_zlib_on=no
+AC_ARG_WITH(zlib,
+	AS_HELP_STRING([--without-zlib],
+		       [disable zlib compression (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(z, deflate)
+			AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
+				AC_MSG_ERROR([Can't enable zlib!])
+			)
+		fi
+	],
+	[	AC_CHECK_LIB(z, deflate)
+		AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
+	]
+)
+if test "$x_zlib_on" = "yes"; then
+	AC_DEFINE(ZLIB, 1)
+	AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
+fi
+
+# detect which IO API to use:
+
+x_io_backend=none
+
+AC_ARG_WITH(select,
+	AS_HELP_STRING([--without-select],
+		       [disable select IO support (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_FUNCS(select, x_io_select=yes,
+				AC_MSG_ERROR([Can't enable select IO support!])
+			)
+		fi
+	],
+	[
+		AC_CHECK_FUNCS(select, x_io_select=yes)
+	]
+)
+
+AC_ARG_WITH(poll,
+	AS_HELP_STRING([--without-poll],
+		       [disable poll support (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_FUNCS(poll, [
+				AC_CHECK_HEADERS(poll.h,
+					x_io_backend=poll\(\),
+					AC_MSG_ERROR(
+					     [Can't enable poll IO support!])
+				)
+			], [
+				AC_MSG_ERROR([Can't enable poll IO support!])
+			])
+		fi
+	],
+	[
+		AC_CHECK_FUNCS(poll, [
+			AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
+		])
+	]
+)
+
+AC_ARG_WITH(devpoll,
+	AS_HELP_STRING([--without-devpoll],
+		       [disable /dev/poll IO support (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+
+				AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
+		fi
+	],
+	[
+		AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
+	]
+)
+
+AC_ARG_WITH(epoll,
+	AS_HELP_STRING([--without-epoll],
+		       [disable epoll IO support (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes,
+				AC_MSG_ERROR([Can't enable epoll IO support!])
+			)
+		fi
+	],
+	[
+		AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
+	]
+)
+
+AC_ARG_WITH(kqueue,
+	AS_HELP_STRING([--without-kqueue],
+		       [disable kqueue IO support (autodetected by default)]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\),
+				AC_MSG_ERROR([Can't enable kqueue IO support!])
+			)
+		fi
+	],
+	[
+		AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
+	]
+)
+
+if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
+	# when epoll() and select() are available, we'll use both!
+	x_io_backend="epoll(), select()"
+else
+	if test "$x_io_epoll" = "yes"; then
+		# we prefere epoll() if it is available
+		x_io_backend="epoll()"
+	else
+		if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
+			# we'll use select, when available and no "better"
+			# interface has been detected ...
+			x_io_backend="select()"
+		fi
+	fi
+fi
+
+if test "$x_io_backend" = "none"; then
+	AC_MSG_ERROR([No useable IO API activated/found!?])
+fi
+
+# use SSL?
+
+AC_ARG_WITH(openssl,
+	AS_HELP_STRING([--with-openssl],
+		       [enable SSL support using OpenSSL]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(crypto, BIO_s_mem)
+			AC_CHECK_LIB(ssl, SSL_library_init)
+			AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
+				AC_MSG_ERROR([Can't enable openssl])
+			)
+		fi
+	]
+)
+
+AC_ARG_WITH(gnutls,
+	AS_HELP_STRING([--with-gnutls],
+		       [enable SSL support using gnutls]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(gnutls, gnutls_global_init)
+			AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
+				AC_MSG_ERROR([Can't enable gnutls])
+			)
+		fi
+	]
+)
+
+x_ssl_lib="no"
+if test "$x_ssl_gnutls" = "yes"; then
+	if test "$x_ssl_openssl" = "yes";then
+		AC_MSG_ERROR([Cannot enable both gnutls and openssl])
+	fi
+	x_ssl_lib=gnutls
+fi
+if test "$x_ssl_openssl" = "yes"; then
+	x_ssl_lib=openssl
+fi
+
+# use TCP wrappers?
+
+x_tcpwrap_on=no
+AC_ARG_WITH(tcp-wrappers,
+	AS_HELP_STRING([--with-tcp-wrappers],
+		       [enable TCP wrappers support]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_MSG_CHECKING(for hosts_access)
+			LIBS="-lwrap $LIBS"
+			AC_TRY_LINK([
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity = 0;
+				],[
+				tcpd_warn("link test");
+				],[
+				AC_MSG_RESULT(yes)
+				AC_DEFINE(TCPWRAP, 1)
+				x_tcpwrap_on=yes
+				],[
+				AC_MSG_RESULT(no)
+				AC_MSG_ERROR([Can't enable TCP wrappers!])
+			])
+		fi
+	]
+)
+
+# do IDENT requests using libident?
+
+x_identauth_on=no
+AC_ARG_WITH(ident,
+	AS_HELP_STRING([--with-ident],
+		       [enable "IDENT" ("AUTH") protocol support]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(ident, ident_id)
+			AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
+				AC_MSG_ERROR([Can't enable IDENT support!])
+			)
+		fi
+	]
+)
+if test "$x_identauth_on" = "yes"; then
+	AC_DEFINE(IDENTAUTH, 1)
+	AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
+fi
+
+# compile in PAM support?
+
+x_pam_on=no
+AC_ARG_WITH(pam,
+	AS_HELP_STRING([--with-pam],
+		       [enable user authentication using PAM]),
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(pam, pam_authenticate)
+			AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
+				AC_MSG_ERROR([Can't enable PAM support!])
+			)
+		fi
+	]
+)
+if test "$x_pam_on" = "yes"; then
+	AC_DEFINE(PAM, 1)
+	AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
+	if test "$pam_ok" != "yes"; then
+		AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
+			AC_MSG_ERROR([required C header missing!]))
+	fi
+fi
+
+# compile in IRC+ protocol support?
+
+x_ircplus_on=yes
+AC_ARG_ENABLE(ircplus,
+	AS_HELP_STRING([--disable-ircplus],
+		       [disable IRC+ protocol]),
+	if test "$enableval" = "no"; then x_ircplus_on=no; fi
+)
+if test "$x_ircplus_on" = "yes"; then
+	AC_DEFINE(IRCPLUS, 1)
+
+	# Compile in iconv support?
+	# We only check for it when IRC+ is enabled, because the IRC+ command
+	# CHARCONV is the only function depending on it.
+	x_iconv_on=no
+	AC_ARG_WITH(iconv,
+		[  --with-iconv            enable character conversation using libiconv],
+		[ if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(iconv, iconv_open)
+			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
+				AC_MSG_ERROR([Can't enable libiconv support!])
+			)
+		  fi
+		]
+	)
+	if test "$x_iconv_on" = "yes"; then
+		AC_DEFINE(ICONV, 1)
+	fi
+fi
+
+# enable support for IPv6?
+x_ipv6_on=no
+AC_ARG_ENABLE(ipv6,
+	AS_HELP_STRING([--enable-ipv6],
+		       [enable IPv6 protocol support]),
+	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
+)
+if test "$x_ipv6_on" = "yes"; then
+	# getaddrinfo() and getnameinfo() are optional when not compiling
+	# with IPv6 support, but are required for IPv6 to work!
+	AC_CHECK_FUNCS([ \
+		getaddrinfo getnameinfo \
+		],,AC_MSG_ERROR([required function missing for IPv6 support!]))
+	AC_DEFINE(WANT_IPV6, 1)
+fi
+
+# compile in IRC "sniffer"?
+
+x_sniffer_on=no; x_debug_on=no
+AC_ARG_ENABLE(sniffer,
+	AS_HELP_STRING([--enable-sniffer],
+		       [enable IRC traffic sniffer (enables debug mode)]),
+	if test "$enableval" = "yes"; then
+		AC_DEFINE(SNIFFER, 1)
+		x_sniffer_on=yes; x_debug_on=yes
+	fi
+)
+
+# enable additional debugging code?
+
+AC_ARG_ENABLE(debug,
+	AS_HELP_STRING([--enable-debug],
+		       [show additional debug output]),
+	if test "$enableval" = "yes"; then x_debug_on=yes; fi
+)
+if test "$x_debug_on" = "yes"; then
+	AC_DEFINE(DEBUG, 1)
+	test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
+	AC_CHECK_FUNCS(mtrace)
+fi
+
+# enable "strict RFC rules"?
+
+x_strict_rfc_on=no
+AC_ARG_ENABLE(strict-rfc,
+	AS_HELP_STRING([--enable-strict-rfc],
+		       [strict RFC conformance -- may break clients!]),
+	if test "$enableval" = "yes"; then
+		AC_DEFINE(STRICT_RFC, 1)
+		x_strict_rfc_on=yes
+	fi
+)
+
+# -- Definitions --
+
+AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
+AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
+AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
+
+# Add additional CFLAGS, eventually specified on the command line, but after
+# running this configure script. Useful for "-Werror" for example.
+test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
+
+# -- Generate files --
+
+AC_CONFIG_FILES([ \
+	Makefile \
+	contrib/Debian/Makefile \
+	contrib/MacOSX/Makefile \
+	contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+	contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
+	contrib/Makefile \
+	doc/Makefile \
+	doc/src/Makefile \
+	man/Makefile \
+	src/ipaddr/Makefile \
+	src/Makefile \
+	src/ngircd/Makefile \
+	src/portab/Makefile \
+	src/testsuite/Makefile \
+	src/tool/Makefile \
+])
+
+AC_OUTPUT
+
+type dpkg >/dev/null 2>&1
+if test $? -eq 0; then
+	# Generate debian/ link if the dpkg command exists
+	# (read: if we are running on a debian compatible system)
+	echo "creating Debian-specific links ..."
+	test -f debian/rules || ln -s contrib/Debian debian
+fi
+
+# -- Result --
+
+echo
+echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
+echo
+
+# Someone please show me a better way :)  [borrowed by OpenSSH]
+B=`eval echo ${bindir}` ; B=`eval echo ${B}`
+S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
+C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
+M=`eval echo ${mandir}` ; M=`eval echo ${M}`
+D=`eval echo ${docdir}` ; D=`eval echo ${D}`
+
+echo "               Host: ${host}"
+echo "           Compiler: ${CC}"
+test -n "$CFLAGS"	&& echo "     Compiler flags: ${CFLAGS}"
+test -n "$CPPFLAGS"	&& echo " Preprocessor flags: ${CPPFLAGS}"
+test -n "$LDFLAGS"	&& echo "       Linker flags: ${LDFLAGS}"
+test -n "$LIBS"		&& echo "          Libraries: ${LIBS}"
+echo
+echo "    'ngircd' binary: $S"
+echo " Configuration file: $C"
+echo "       Manual pages: $M"
+echo "      Documentation: $D"
+echo
+
+echo $ECHO_N "     Syslog support: $ECHO_C"
+test "$x_syslog_on" = "yes" \
+	&& echo $ECHO_N "yes   $ECHO_C" \
+	|| echo $ECHO_N "no    $ECHO_C"
+echo $ECHO_N "  Enable debug code: $ECHO_C"
+test "$x_debug_on" = "yes" \
+	&& echo "yes" \
+	|| echo "no"
+
+echo $ECHO_N "   zlib compression: $ECHO_C"
+test "$x_zlib_on" = "yes" \
+	&& echo $ECHO_N "yes   $ECHO_C" \
+	|| echo $ECHO_N "no    $ECHO_C"
+echo $ECHO_N "        IRC sniffer: $ECHO_C"
+test "$x_sniffer_on" = "yes" \
+	&& echo "yes" \
+	|| echo "no"
+
+echo $ECHO_N "   Use TCP Wrappers: $ECHO_C"
+test "$x_tcpwrap_on" = "yes" \
+	&& echo $ECHO_N "yes   $ECHO_C" \
+	|| echo $ECHO_N "no    $ECHO_C"
+echo $ECHO_N "    Strict RFC mode: $ECHO_C"
+test "$x_strict_rfc_on" = "yes" \
+	&& echo "yes" \
+	|| echo "no"
+
+echo $ECHO_N "      IDENT support: $ECHO_C"
+test "$x_identauth_on" = "yes" \
+	&& echo $ECHO_N "yes   $ECHO_C" \
+	|| echo $ECHO_N "no    $ECHO_C"
+echo $ECHO_N "      IRC+ protocol: $ECHO_C"
+test "$x_ircplus_on" = "yes" \
+	&& echo "yes" \
+	|| echo "no"
+
+echo $ECHO_N "      IPv6 protocol: $ECHO_C"
+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 $ECHO_N "        PAM support: $ECHO_C"
+test "$x_pam_on" = "yes" \
+	&& echo $ECHO_N "yes   $ECHO_C" \
+	|| echo $ECHO_N "no    $ECHO_C"
+echo $ECHO_N "        SSL support: $ECHO_C"
+echo "$x_ssl_lib"
+
+echo $ECHO_N "   libiconv support: $ECHO_C"
+	echo "$x_iconv_on"
+
+echo
+
+if ! grep "^AUTOMAKE_OPTIONS = ../portab/ansi2knr" src/ngircd/Makefile.am >/dev/null 2>&1; then
+	echo "WARNING:"
+	echo "This GNU automake generated build system does not support \"de-ANSI-fication\","
+	echo "therefore don't use it to generate \"official\" distribution archives!"
+	echo "(Most probably you want to use GNU automake 1.11.x for this purpose ...)"
+	echo
+fi
+
+# -eof-

+ 0 - 495
contrib/Anope/0001-Revert-Removed-ngircd.patch

@@ -1,496 +0,0 @@
-From bc5023fdba8091ab7eee29fe0deeca6843159743 Mon Sep 17 00:00:00 2001
-From: Alexander Barton <alex@barton.de>
-Date: Mon, 16 May 2011 18:23:01 +0200
-Subject: [PATCH 1/2] Revert "Removed ngircd as we've decided not to support it at this time"
-
-This reverts commit 605b5d57171d2f0fac56ee2ee3e1b1bbdadeb24f and re-enables
-the ngIRCd protocol module for Anope.
----
- modules/protocol/ngircd.cpp |  475 +++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 475 insertions(+), 0 deletions(-)
- create mode 100644 modules/protocol/ngircd.cpp
-
-diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
-new file mode 100644
-index 0000000..6e1f21f
---- /dev/null
-+++ b/modules/protocol/ngircd.cpp
-@@ -0,0 +1,475 @@
-+/* ngIRCd IRCD functions
-+ *
-+ * (C) 2003-2011 Anope Team
-+ * Contact us at team@anope.org
-+ *
-+ * Please read COPYING and README for further details.
-+ *
-+ * Based on the original code of Epona by Lara.
-+ * Based on the original code of Services by Andy Church.
-+ */
-+
-+#include "services.h"
-+#include "modules.h"
-+
-+IRCDVar myIrcd[] = {
-+	{"ngIRCd",	/* ircd name */
-+	 "+oi",		/* Modes used by pseudoclients */
-+	 0,		/* SVSNICK */
-+	 0,		/* Vhost */
-+	 0,		/* Supports SNlines */
-+	 0,		/* Supports SQlines */
-+	 0,		/* Supports SZlines */
-+	 0,		/* Join 2 Message */
-+	 0,		/* Chan SQlines */
-+	 1,		/* Quit on Kill */
-+	 0,		/* vidents */
-+	 0,		/* svshold */
-+	 0,		/* time stamp on mode */
-+	 0,		/* UMODE */
-+	 0,		/* O:LINE */
-+	 0,		/* No Knock requires +i */
-+	 0,		/* Can remove User Channel Modes with SVSMODE */
-+	 0,		/* Sglines are not enforced until user reconnects */
-+	 0,		/* ts6 */
-+	 "$",		/* TLD Prefix for Global */
-+	 20,		/* Max number of modes we can send per line */
-+	 0,		/* IRCd sends a SSL users certificate fingerprint */
-+	 }
-+	,
-+	{NULL}
-+};
-+
-+/* PASS */
-+class ngIRCdProto : public IRCDProto
-+{
-+	void SendAkill(User *u, const XLine *x)
-+	{
-+		if (SGLine && u == NULL)
-+			for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end();)
-+			{
-+				u = it->second;
-+				++it;
-+				if (SGLine->Check(u) != NULL)
-+					break;
-+			}
-+	}
-+
-+	void SendAkillDel(const XLine*) { }
-+
-+	void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf)
-+	{
-+		send_cmd(source ? source->nick : Config->ServerName, "WALLOPS :%s", buf.c_str());
-+	}
-+
-+	void SendJoin(BotInfo *user, Channel *c, const ChannelStatus *status)
-+	{
-+		send_cmd(user->nick, "JOIN %s", c->name.c_str());
-+		if (status)
-+			for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
-+				if (status->HasFlag(ModeManager::ChannelModes[i]->Name))
-+					c->SetMode(user, ModeManager::ChannelModes[i], user->nick, false);
-+	}
-+
-+	void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
-+	{
-+		send_cmd(source ? source->nick : Config->ServerName, "KILL %s :%s", user->nick.c_str(), buf.c_str());
-+	}
-+
-+	/* SERVER name hop descript */
-+	void SendServer(const Server *server)
-+	{
-+		send_cmd("", "SERVER %s %d :%s", server->GetName().c_str(), server->GetHops(), server->GetDescription().c_str());
-+	}
-+
-+	void SendConnect()
-+	{
-+		send_cmd("", "PASS %s 0210-IRC+ Anope|%s:CLHSo P", uplink_server->password.c_str(), Anope::VersionShort().c_str());
-+		/* Make myself known to myself in the serverlist */
-+		SendServer(Me);
-+		/* finish the enhanced server handshake and register the connection */
-+		this->SendNumeric(Config->ServerName, 376, "*", ":End of MOTD command");
-+	}
-+
-+	// Received: :dev.anope.de NICK DukeP 1 ~DukePyro p57ABF9C9.dip.t-dialin.net 1 +i :DukePyrolator
-+	void SendClientIntroduction(const User *u, const Anope::string &modes)
-+	{
-+		EnforceQlinedNick(u->nick, "");
-+		send_cmd(Config->ServerName, "NICK %s 1 %s %s 1 %s :%s", u->nick.c_str(), u->GetIdent().c_str(), u->host.c_str(), modes.c_str(), u->realname.c_str());
-+	}
-+
-+	void SendPartInternal(const BotInfo *bi, const Channel *chan, const Anope::string &buf)
-+	{
-+		if (!buf.empty())
-+			send_cmd(bi->nick, "PART %s :%s", chan->name.c_str(), buf.c_str());
-+		else
-+			send_cmd(bi->nick, "PART %s", chan->name.c_str());
-+	}
-+
-+	void SendModeInternal(const BotInfo *bi, const Channel *dest, const Anope::string &buf)
-+	{
-+		send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", dest->name.c_str(), buf.c_str());
-+	}
-+
-+	void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf)
-+	{
-+		send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
-+	}
-+
-+	void SendKickInternal(const BotInfo *bi, const Channel *chan, const User *user, const Anope::string &buf)
-+	{
-+		if (!buf.empty())
-+			send_cmd(bi->nick, "KICK %s %s :%s", chan->name.c_str(), user->nick.c_str(), buf.c_str());
-+		else
-+			send_cmd(bi->nick, "KICK %s %s", chan->name.c_str(), user->nick.c_str());
-+	}
-+
-+	void SendNoticeChanopsInternal(const BotInfo *source, const Channel *dest, const Anope::string &buf)
-+	{
-+		send_cmd(source ? source->nick : Config->s_ChanServ, "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
-+	}
-+
-+	/* INVITE */
-+	void SendInvite(BotInfo *source, const Anope::string &chan, const Anope::string &nick)
-+	{
-+		send_cmd(source->nick, "INVITE %s %s", nick.c_str(), chan.c_str());
-+	}
-+
-+	void SendChannel(Channel *c)
-+	{
-+		Anope::string mlock_modes = get_mlock_modes(c->ci, true);
-+		if (mlock_modes.empty())
-+			mlock_modes = "+";
-+		send_cmd(Config->ServerName, "CHANINFO %s %s", c->name.c_str(), mlock_modes.c_str());
-+	}
-+	void SendTopic(BotInfo *bi, Channel *c)
-+	{
-+		send_cmd(bi->nick, "TOPIC %s :%s", c->name.c_str(), c->topic.c_str());
-+	}
-+};
-+
-+class ngIRCdIRCdMessage : public IRCdMessage
-+{
-+ public:
-+	bool OnSJoin(const Anope::string&, const std::vector<Anope::string>&) { return false; }
-+
-+	/*
-+	 * Received: :dev.anope.de MODE #anope +b *!*@*aol*
-+	 */
-+	bool OnMode(const Anope::string &source, const std::vector<Anope::string> &params)
-+	{
-+		if (params.size() < 2)
-+			return true;
-+
-+		Anope::string modes = params[1];
-+		for (unsigned i = 2; i < params.size(); ++i)
-+			modes += " " + params[i];
-+
-+		if (params[0][0] == '#' || params[0][0] == '&')
-+			do_cmode(source, params[0], modes, "");
-+		else
-+			do_umode(params[0], params[1]);
-+
-+		return true;
-+	}
-+
-+	/*
-+	  Received: :DukeP_ NICK :test2
-+	  Received: :dev.anope.de NICK DukeP_ 1 ~DukePyro ip-2-201-236-154.web.vodafone.de 1 + :DukePyrolator
-+	  source = nickname on nickchange, servername on newuser
-+	  params[0] = nick
-+	  params[1] = <unknown>
-+	  params[2] = username
-+	  params[3] = host
-+	  params[4] = <unknown>
-+	  params[5] = modes
-+	  params[6] = info
-+	*/
-+	bool OnNick(const Anope::string &source, const std::vector<Anope::string> &params)
-+	{
-+		if (params.size() == 1)
-+		{
-+			// we have a nickchange
-+			do_nick(source, params[0], "", "", "", "", Anope::CurTime, "", "", "", "");
-+		}
-+		else if (params.size() == 7)
-+		{
-+			// a new user is connecting to the network
-+			User *user = do_nick("", params[0], params[2], params[3], source, params[6], Anope::CurTime, "", "", "", params[5]);
-+			if (user)
-+				validate_user(user);
-+		}
-+		else
-+		{
-+			Log() << "Received NICK with invalid number of parameters. source = " << source << "param[0] = " << params[0] << "params.size() = " << params.size();
-+		}
-+		return true;
-+	}
-+
-+	bool OnServer(const Anope::string &source, const std::vector<Anope::string> &params)
-+	{
-+		if (params.size() == 3)
-+			do_server("", params[0], 0, params[2], params[1]);
-+		else
-+			do_server(source, params[0], params[1].is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0, params[3], params[2]);
-+		return true;
-+	}
-+
-+	bool OnTopic(const Anope::string &source, const std::vector<Anope::string> &params)
-+	{
-+		Channel *c = findchan(params[0]);
-+		if (!c)
-+		{
-+			Log() << "TOPIC for nonexistant channel " << params[0];
-+			return true;
-+		}
-+
-+		c->ChangeTopicInternal(source, params[1]);
-+		return true;
-+	}
-+
-+	/*
-+	 * <@po||ux> DukeP: RFC 2813, 4.2.1: the JOIN command on server-server links
-+	 * separates the modes ("o") with ASCII 7, not space. And you can't see ASCII 7.
-+	 *
-+	 * if a user joins a new channel, the ircd sends <channelname>\7<umode>
-+	 */
-+	bool OnJoin (const Anope::string &source, const std::vector<Anope::string> &params)
-+	{
-+		if (!params.empty())
-+		{
-+			size_t pos = params[0].find('\7');
-+			if (pos != Anope::string::npos)
-+			{
-+				Anope::string channel = params[0].substr(0, pos);
-+				Anope::string mode = '+' + params[0].substr(pos, params[0].length()) + " " + source;
-+				do_join(source, channel, "");
-+				do_cmode(source, channel, mode, "");
-+			}
-+			else
-+				do_join(source, params[0], "");
-+		}
-+		return true;
-+	}
-+};
-+
-+/*
-+ * CHANINFO <chan> +<modes>
-+ * CHANINFO <chan> +<modes> :<topic>
-+ * CHANINFO <chan> +<modes> <key> <limit> :<topic>
-+ */
-+bool event_chaninfo(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+
-+	Channel *c = findchan(params[0]);
-+	if (!c)
-+		c = new Channel(params[0]);
-+
-+	Anope::string modes = params[1];
-+	
-+	if (params.size() == 3)
-+	{
-+		c->ChangeTopicInternal(source, params[2], Anope::CurTime);
-+	} 
-+	else if (params.size() == 5)
-+	{
-+		for (size_t i = 0, end = params[1].length(); i < end; ++i)
-+		{
-+			switch(params[1][i])
-+			{
-+				case 'k':
-+					modes += " " + params[2];
-+					continue;
-+				case 'l':
-+					modes += " " + params[3];
-+					continue;
-+			}
-+		}
-+		c->ChangeTopicInternal(source, params[4], Anope::CurTime);
-+	}
-+
-+	c->SetModesInternal(NULL, modes);
-+
-+	return true;
-+}
-+
-+/*
-+ * Received: :dev.anope.de NJOIN #test :DukeP2,@DukeP
-+ */
-+bool event_njoin(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	Channel *c = findchan(params[0]);
-+	commasepstream sep(params[1]);
-+	Anope::string buf;
-+
-+	if (!c)
-+	{
-+		c = new Channel(params[0], Anope::CurTime);
-+		c->SetFlag(CH_SYNCING);
-+	}
-+	
-+	while (sep.GetToken(buf))
-+	{
-+		std::list<ChannelMode *> Status;
-+		char ch;
-+
-+		/* Get prefixes from the nick */
-+		while ((ch = ModeManager::GetStatusChar(buf[0])))
-+		{
-+			buf.erase(buf.begin());
-+			ChannelMode *cm = ModeManager::FindChannelModeByChar(ch);
-+			if (!cm)
-+			{
-+				Log() << "Received unknown mode prefix " << ch << " in NJOIN string.";
-+				continue;
-+			}
-+			Status.push_back(cm);
-+		}
-+		User *u = finduser(buf);
-+		if (!u)
-+		{
-+			Log(LOG_DEBUG) << "NJOIN for nonexistant user " << buf << " on " << c->name;
-+			continue;
-+		}
-+
-+		EventReturn MOD_RESULT;
-+		FOREACH_RESULT(I_OnPreJoinChannel, OnPreJoinChannel(u, c));
-+
-+		/* Add the user to the Channel */
-+		c->JoinUser(u);
-+
-+		/* Update their status internally on the channel
-+		 * This will enforce secureops etc on the user
-+		 */
-+		for (std::list<ChannelMode *>::iterator it = Status.begin(), it_end = Status.end(); it != it_end; ++it)
-+			c->SetModeInternal(*it, buf);
-+		/* Now set whatever modes this user is allowed to have on the channel */
-+		chan_set_correct_modes(u, c, 1);
-+
-+		/* Check to see if modules want the user to join, if they do
-+		 * check to see if they are allowed to join (CheckKick will kick/ban them)
-+		 * Don't trigger OnJoinChannel event then as the user will be destroyed
-+		 */
-+		if (MOD_RESULT != EVENT_STOP && c->ci && c->ci->CheckKick(u))
-+			continue;
-+
-+		FOREACH_MOD(I_OnJoinChannel, OnJoinChannel(u, c));
-+	} /* while */
-+
-+	if (c->HasFlag(CH_SYNCING))
-+	{
-+		c->UnsetFlag(CH_SYNCING);
-+		c->Sync();
-+	}
-+
-+	return true;
-+}
-+
-+bool event_kick(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	if (params.size() > 2)
-+		do_kick(source, params[0], params[1], params[2]);
-+	return true;
-+}
-+
-+bool event_pass(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	return true;
-+}
-+
-+bool event_005(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	size_t pos;
-+	Anope::string name, data;
-+	for (unsigned i = 0, end = params.size(); i < end; ++i)
-+	{
-+		pos = params[i].find('=');
-+		if (pos != Anope::string::npos)
-+		{
-+			name = params[i].substr(0, pos);
-+			data = params[i].substr(pos+1, params[i].length());
-+			if (name == "NICKLEN")
-+			{
-+				unsigned newlen = convertTo<unsigned>(data);
-+				if (Config->NickLen != newlen)
-+				{
-+					Log() << "Config->NickLen changed from " << Config->NickLen << " to " << newlen;
-+					Config->NickLen = newlen;
-+				}
-+			}
-+		}
-+	}
-+	return true;
-+}
-+
-+bool event_442(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	return true;
-+}
-+
-+bool event_376(const Anope::string &source, const std::vector<Anope::string> &params)
-+{
-+	return true;
-+}
-+
-+
-+class ProtongIRCd : public Module
-+{
-+	Message message_kick, message_pass, message_njoin, message_chaninfo, message_005, 
-+		message_442, message_376;
-+	
-+	ngIRCdProto ircd_proto;
-+	ngIRCdIRCdMessage ircd_message;
-+
-+	void AddModes()
-+	{
-+		/* Add user modes */
-+		ModeManager::AddUserMode(new UserMode(UMODE_ADMIN, 'a'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_RESTRICTED, 'r'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_SNOMASK, 's'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w'));
-+		ModeManager::AddUserMode(new UserMode(UMODE_CLOAK, 'x'));
-+
-+		/* b/e/I */
-+		ModeManager::AddChannelMode(new ChannelModeBan(CMODE_BAN, 'b'));
-+		ModeManager::AddChannelMode(new ChannelModeList(CMODE_INVITEOVERRIDE, 'I'));
-+
-+		/* v/h/o/a/q */
-+		ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', '+'));
-+		ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', '@'));
-+
-+		/* Add channel modes */
-+		// channel modes: biIklmnoPstvz
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i'));
-+		ModeManager::AddChannelMode(new ChannelModeKey('k'));
-+		ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_PERM, 'P'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't'));
-+		ModeManager::AddChannelMode(new ChannelMode(CMODE_SSL, 'z'));
-+	}
-+
-+ public:
-+	ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator),
-+		message_kick("KICK", event_kick), message_pass("PASS", event_pass),
-+		message_njoin("NJOIN", event_njoin), message_chaninfo("CHANINFO", event_chaninfo),
-+		message_005("005", event_005), message_442("442", event_442), message_376("376", event_376)
-+	{
-+		this->SetAuthor("Anope");
-+		this->SetType(PROTOCOL);
-+		
-+		Capab.SetFlag(CAPAB_QS);
-+
-+		pmodule_ircd_var(myIrcd);
-+		pmodule_ircd_proto(&this->ircd_proto);
-+		pmodule_ircd_message(&this->ircd_message);
-+
-+		this->AddModes();
-+	}
-+};
-+
-+MODULE_INIT(ProtongIRCd)
-1.7.2.5
-

+ 0 - 59
contrib/Anope/0002-ngircd-whitespace-fixes.patch

@@ -1,60 +0,0 @@
-From 1ea1dd2095e63cef34edbebb729edc687f410a96 Mon Sep 17 00:00:00 2001
-From: Alexander Barton <alex@barton.de>
-Date: Mon, 16 May 2011 18:26:56 +0200
-Subject: [PATCH 2/2] ngircd: whitespace fixes
-
----
- modules/protocol/ngircd.cpp |   12 ++++++------
- 1 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
-index 6e1f21f..e546d05 100644
---- a/modules/protocol/ngircd.cpp
-+++ b/modules/protocol/ngircd.cpp
-@@ -266,11 +266,11 @@ bool event_chaninfo(const Anope::string &source, const std::vector<Anope::string
- 		c = new Channel(params[0]);
- 
- 	Anope::string modes = params[1];
--	
-+
- 	if (params.size() == 3)
- 	{
- 		c->ChangeTopicInternal(source, params[2], Anope::CurTime);
--	} 
-+	}
- 	else if (params.size() == 5)
- 	{
- 		for (size_t i = 0, end = params[1].length(); i < end; ++i)
-@@ -307,7 +307,7 @@ bool event_njoin(const Anope::string &source, const std::vector<Anope::string> &
- 		c = new Channel(params[0], Anope::CurTime);
- 		c->SetFlag(CH_SYNCING);
- 	}
--	
-+
- 	while (sep.GetToken(buf))
- 	{
- 		std::list<ChannelMode *> Status;
-@@ -415,9 +415,9 @@ bool event_376(const Anope::string &source, const std::vector<Anope::string> &pa
- 
- class ProtongIRCd : public Module
- {
--	Message message_kick, message_pass, message_njoin, message_chaninfo, message_005, 
-+	Message message_kick, message_pass, message_njoin, message_chaninfo, message_005,
- 		message_442, message_376;
--	
-+
- 	ngIRCdProto ircd_proto;
- 	ngIRCdIRCdMessage ircd_message;
- 
-@@ -461,7 +461,7 @@ class ProtongIRCd : public Module
- 	{
- 		this->SetAuthor("Anope");
- 		this->SetType(PROTOCOL);
--		
-+
- 		Capab.SetFlag(CAPAB_QS);
- 
- 		pmodule_ircd_var(myIrcd);
-1.7.2.5
-

+ 0 - 127
contrib/Anope/0003-Update-ngIRCd-protocol-module-for-current-Anope-1.9.patch

@@ -1,128 +0,0 @@
-From d8eddbeaadc7d161865b5342d59748b80266533c Mon Sep 17 00:00:00 2001
-From: DukePyrolator <DukePyrolator@anope.org>
-Date: Mon, 22 Aug 2011 14:53:37 +0200
-Subject: [PATCH 03/16] Update ngIRCd protocol module for current Anope 1.9
- GIT
-
----
- modules/protocol/ngircd.cpp |   37 ++++++++++++++++++-------------------
- 1 files changed, 18 insertions(+), 19 deletions(-)
-
-diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
-index e546d05..790b8f4 100644
---- a/modules/protocol/ngircd.cpp