]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Merge branch 'autoconf-update'
authorAlexander Barton <alex@barton.de>
Sun, 16 Sep 2012 11:05:23 +0000 (13:05 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 16 Sep 2012 11:05:23 +0000 (13:05 +0200)
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, ...)

src/ngircd/irc-info.c
src/ngircd/irc-login.c
src/ngircd/ngircd.c
src/ngircd/sighandlers.c

index 6eb8d9421922e8606e0e5cbd83729f1c90c7d4b5..fc04773ae14ef307d1ac5adb0b53f2a18a64dd03 100644 (file)
@@ -1595,10 +1595,10 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
                if (is_member || is_visible) {
                        if (str[strlen(str) - 1] != ':')
                                strlcat(str, " ", sizeof(str));
-                       if (Client_Cap(cl) & CLIENT_CAP_MULTI_PREFIX) {
-                               if (strchr(Channel_UserModes(Chan, cl), 'o') &&
-                                   strchr(Channel_UserModes(Chan, cl), 'v'))
-                                       strlcat(str, "@+", sizeof(str));
+                       if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX && 
+                                       strchr(Channel_UserModes(Chan, cl), 'o') &&
+                                       strchr(Channel_UserModes(Chan, cl), 'v')) {
+                               strlcat(str, "@+", sizeof(str));
                        } else {
                                if (strchr(Channel_UserModes(Chan, cl), 'o'))
                                        strlcat(str, "@", sizeof(str));
index 9e1abdd59e8b0349b535b9b1299989f994a3827c..74d8b9d116b3bb71de2388a0c71838f0c86f4e29 100644 (file)
@@ -418,12 +418,15 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
                                                  Client_ID(Client),
                                                  Req->command);
 
-               /* User name: only alphanumeric characters are allowed! */
+               /* User name: only alphanumeric characters and limited
+                  punctuation is allowed.*/
                ptr = Req->argv[0];
                while (*ptr) {
                        if ((*ptr < '0' || *ptr > '9') &&
                            (*ptr < 'A' || *ptr > 'Z') &&
-                           (*ptr < 'a' || *ptr > 'z')) {
+                           (*ptr < 'a' || *ptr > 'z') &&
+                           (*ptr != '+') && (*ptr != '-') &&
+                           (*ptr != '.') && (*ptr != '_')) {
                                Conn_Close(Client_Conn(Client), NULL,
                                           "Invalid user name", true);
                                return DISCONNECTED;
index 44c4ca79be266dafbd742650952186cec036da11..7397ee024a61b3c4814bf50ceca60472214d7006 100644 (file)
@@ -330,6 +330,7 @@ main(int argc, const char *argv[])
                Channel_Exit();
                Class_Exit();
                Log_Exit();
+               Signals_Exit();
        }
        Pidfile_Delete();
 
index efb41bcd8465147ff68fff0f70afcac1452cdba9..a219105f4b5aff571e045f22d58f0f5fc4d17162 100644 (file)
@@ -334,6 +334,7 @@ Signals_Exit(void)
 #endif
        close(signalpipe[1]);
        close(signalpipe[0]);
+       signalpipe[0] = signalpipe[1] = 0;
 }
 
 /* -eof- */