Commit Graph

2737 Commits

Author SHA1 Message Date
Alexander Barton d7d5f4330b configure.ng: don't require GIT tree to detect version string 2012-09-24 18:00:36 +02:00
Alexander Barton 79c1222896 Include .mailmap file in distribution archives 2012-09-24 17:50:32 +02:00
Alexander Barton 8e1beae4e7 Include all build-system files into distribution archives 2012-09-24 14:34:16 +02:00
Alexander Barton 192e304b94 Change build system to support new and old GNU automake
Starting with GNU automake 1.12, the "de-ANSI-fication support" has been
removed, which ngIRCd used to enable building itself on very old systems.

Now the problem is, that using automake >= 1.12 isn't working because of
the now unsupported M4 macros. Therefore the solution that this patch
implements is to dynamically generate the automake input files with our
own ./autogen.sh script:

  configure.ng => configure.in
  Makefile.ng => Makefile.am

This is quite an ugly approach, but it works and enables us to:

  1. use current automake >= 1.12 for development and "private builds",
  2. still build distribution archives using automake 1.11.x that have
     "de-ANSI-fication support" enabled in the generated Makefile's.

And if you are using Makefile's generated with a automake version newer
than 1.11.x (without "de-ANSI-fication support"), the ./configure script
warns you not to use this generated build system to generate distribution
archives.

Drawback of this patch: you MUST use our autogen.sh script, you can't call
the autoconf/automake commands directly any more; but autoreconf should
still work ...
2012-09-23 18:13:55 +02:00
Alexander Barton 1413a4886f Sort "feature string" alphabetically 2012-09-17 00:55:30 +02:00
Alexander Barton cfec819f0d Include CAP command even when using "strict RFC mode" 2012-09-16 14:08:52 +02:00
Alexander Barton 107bfdc821 Merge branch 'autoconf-update'
Update GNU autoconf and automake infrastructure.
Tested on modern systems as well as Apple A/UX :-)

* autoconf-update:
  AUTOMAKE_OPTIONS: fix ansi2knr option, include path
  Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC
  Make our own targets "silent", if enabled
  configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE
  Updated config.{guess|sub} to version 2012-08-14
  Make autogen.sh more verbose when VERBOSE=1 is set
  configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
  configure.in: use AS_HELP_STRING macro
  configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
  configure.in: inttypes.h is an optional header file
  Use HAVE_SETSID #define when testing for setsid()
  Don't include <stdint.h>, it is included by "portab.h"
  Don't check type.h availability, it is required
  configure.in: Use AC_CONFIG_FILES macro
  configure.in: Don't use AC_C_PROTOTYPES
  configure.in: Update checks for required and optional features
  configure.in: require autoconf 2.67 and automake 1.11
  configure.in: sort some lists (templates, output, ...)
2012-09-16 13:05:23 +02:00
Alexander Barton 5c160921ff AUTOMAKE_OPTIONS: fix ansi2knr option, include path
Set correct relative path to ansi2knr.c in AUTOMAKE_OPTIONS, so that
ansi2knr.{1|c} is only included once in the distribution archive.
2012-09-16 12:43:12 +02:00
Alexander Barton fe3bef55b7 Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC
We don't expect the GNU'ish behaviour of of malloc() and realloc() and never
implemented the replacement functions rpl_malloc()/rpl_realloc() -- so these
test result in linking failues on systems that don't have a GNU'ish malloc()
and realloc() even though we don't require it!

Introduced by commit 47ad9afc.
2012-09-15 20:26:59 +02:00
Alexander Barton 5300f0082c Make our own targets "silent", if enabled 2012-09-15 19:15:16 +02:00
Brett Smith 85abfd84be Allow limited punctuation in usernames, for better PAM integration. 2012-09-14 11:56:38 -04:00
Alexander Barton 005ffeaa8c configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE 2012-09-13 18:48:25 +02:00
Alexander Barton 5c8c6d3c70 Updated config.{guess|sub} to version 2012-08-14 2012-09-13 18:32:28 +02:00
Alexander Barton 7eb3932d3a Make autogen.sh more verbose when VERBOSE=1 is set 2012-09-13 18:25:50 +02:00
Alexander Barton ebf2f991b5 configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
Use the AC_SEARCH_LIBS macro to test for "sometimes but not always"
required libraries, not AC_CHECK_LIB.
2012-09-13 16:40:04 +02:00
Alexander Barton a451cb22f1 configure.in: use AS_HELP_STRING macro 2012-09-13 00:25:09 +02:00
Alexander Barton 82bf4eb059 configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
See the autoconf manual for details:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets
2012-09-13 00:06:08 +02:00
Alexander Barton d53d58fff2 configure.in: inttypes.h is an optional header file 2012-09-12 16:01:11 +02:00
Alexander Barton a072180c92 Merge pull request #2 from briancollins/master
Fix IRC_Send_NAMES not sending correct prefix for certain clients.
2012-09-11 11:29:14 -07:00
Alexander Barton 0fd9a8505a Correctly re-initialize signal handlers on RESTART
This fixes part 2 of bug #127 :-)
2012-09-11 15:44:31 +02:00
Alexander Barton b2482b39e4 Use HAVE_SETSID #define when testing for setsid() 2012-09-11 14:38:19 +02:00
Alexander Barton 74c7d7131f Don't include <stdint.h>, it is included by "portab.h" 2012-09-11 14:37:31 +02:00
Alexander Barton 4dd1c31dc7 Don't check type.h availability, it is required 2012-09-11 14:36:34 +02:00
Alexander Barton 2e13e821f8 configure.in: Use AC_CONFIG_FILES macro 2012-09-11 14:36:02 +02:00
Alexander Barton 2478c5816b configure.in: Don't use AC_C_PROTOTYPES
Don't use AC_C_PROTOTYPES, AM_C_PROTOTYPES is already used.
2012-09-11 14:34:30 +02:00
Alexander Barton 47ad9afcf3 configure.in: Update checks for required and optional features
Update checks for required and optional header files, data types,
and functions.
2012-09-11 14:32:17 +02:00
Alexander Barton 67e882d4bb configure.in: require autoconf 2.67 and automake 1.11
And use newer features such as bug reporting address and project URL.
2012-09-11 14:30:49 +02:00
Alexander Barton 25c216cbdf configure.in: sort some lists (templates, output, ...) 2012-09-11 14:13:17 +02:00
Alexander Barton f5441d2170 New_Connection(): mark "IsSSL" parameter as UNUSED
This fixes the following warning message when building without SSL support:

 conn.c: In function "New_Connection":
 conn.c:1365: warning: unused parameter "IsSSL"

Introduced by commit 01b62202.
2012-09-11 13:15:16 +02:00
Alexander Barton f38a9035e5 Show a warning on startup if config 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.

This fixes parts of bug #127.
2012-09-11 11:40:47 +02:00
Alexander Barton a12d6ff257 Create &SERVER channel after predefined channels
This patch allows you to define &SERVER in a [Channel] block yourself
and to overwrite the built-in topic and channel modes.

Fixes bug #131.
2012-09-10 17:59:15 +02:00
Alexander Barton 2205227c3b WHO #channel: don't limit list size
It makes no sense to limit the list size when doing WHO for a channel
and not to 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).

This fixes bug #125.
2012-09-10 12:43:44 +02:00
Alexander Barton d2d867ea36 Define EV_SET() for kqueue() on systems that don't have it
Some systems, notably FreeBSD 4.x, do have the kqueue() function but
lack the definition of EV_SET() in their header files -- but don't
worry, we can #define it on our own ;-)

Definition taken from /usr/include/sys/event.h of FreeBSD 8.1.
Patch tested on FreeBSD 4.1 by Götz Hoffart. Thanks!
2012-09-04 23:28:32 +02:00
Alexander Barton b232ae2f17 Fix contrib/Makefile.am to list all files in EXTRA_DIST 2012-09-04 22:49:45 +02:00
Alexander Barton 53b2acc00b Update project description 2012-09-04 13:09:27 +02:00
Alexander Barton 01b62202b2 New function Conn_StartLogin() to finish connection initialization
Conn_StartLogin() is called after the connection has been established and
fully innitialized, including the SSL handshake, for example.

Up to this patch, the "NoticeAuth" option broke the SSL handshake ...
2012-08-29 17:24:19 +02:00
Alexander Barton b68bb560e9 Convert CONN_ID and Conf_MaxConnections to "int" datatype
We can't handle more connections than accept(2) can supply, and
accept(2) returns an "int" ...
2012-08-29 17:03:41 +02:00
Alexander Barton 21467c76f1 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.
2012-08-28 23:28:56 +02:00
Alexander Barton 33fae67579 Always cloak client hostname, if needed
Not only cloak the hostname in Client_MaskCloaked(), but also in
Client_HostnameCloaked() -- so move the actual cloaking to this function
and call it in Client_MaskCloaked() to get the (cloaked) hostname.

This fixes USERHOST not displaying the correctly cloaked hostname,
for example.
2012-08-28 23:26:43 +02:00
Alexander Barton 864015fa3f NoticeAuth: make sure messages are flushed immediately 2012-08-28 22:09:06 +02:00
Alexander Barton 1d3def0cc6 Merge branch 'umode-B'
This patch series allows ngIRCd to support the user mode "B" ("Bot flasg"):
it is settable and unsettable by every (non-restricted) client.
According to DNS777, this is how Unreal and InspIRCd do behave, so do we :-)

By Alexander Barton (1) and DNS777 (1)

* umode-B:
  Add new user mode "B" to doc/Modes.txt
  Implement an Unreal-like user mode "B" ("Bot mode")
2012-08-27 23:27:30 +02:00
Alexander Barton e01e8f1cb6 Merge branch 'recognize-umode-R'
By Alexander Barton (1) and DNS777 (1)

* recognize-umode-R:
  Only allow IRC services to modify user mode "R"
  Recognize user mode "R"
2012-08-27 23:21:28 +02:00
Alexander Barton 186ab51137 Only allow IRC services to modify user mode "R" 2012-08-27 23:20:32 +02:00
Alexander Barton 74be904018 ngt_RandomStr(): : make it buildable with pre-ANSI C compilers 2012-08-27 22:42:52 +02:00
Alexander Barton 298cd9a327 Get_CAP_String(): make it buildable with pre-ANSI C compilers 2012-08-27 22:42:04 +02:00
Alexander Barton 414bfe65eb Enhance "NOTICE AUTH": show hostname and IDENT reply 2012-08-27 22:05:55 +02:00
Alexander Barton c519ba9920 Merge branch 'cmode-M'
By Alexander Barton (2) and DNS777 (1)

* cmode-M:
  Add new channel mode "M" to doc/Modes.txt
  Remove Can_Send_To_Channel_Identified()
  Implement channel mode "M"
2012-08-27 21:22:58 +02:00
Alexander Barton fee8ff37b3 Add new channel mode "M" to doc/Modes.txt 2012-08-27 21:17:49 +02:00
Alexander Barton fee591b759 Remove Can_Send_To_Channel_Identified()
Move the functionality directly into Can_Send_To_Channel() function.
There should be no functional change ...
2012-08-27 21:15:12 +02:00
Brian Collins 16f94546f5 Fix NAMES response when client has multi-prefix
Two fixes here: IRC_Send_NAMES was checking the capability of the
wrong client when responding, and it didn't return any prefix for
clients that had either +v or +o but not both.
2012-08-27 16:23:57 +01:00