]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Merge pull request #217 from SaberUK/master+notice-auth
authorAlexander Barton <alex@barton.de>
Sat, 1 Aug 2015 12:51:04 +0000 (14:51 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 1 Aug 2015 12:51:04 +0000 (14:51 +0200)
Use "NOTICE *" before registration instead of "NOTICE AUTH".

doc/sample-ngircd.conf.tmpl
man/ngircd.conf.5.tmpl
src/ngircd/conf.c
src/ngircd/conf.h
src/ngircd/conn.c

index b5db1d9e1edffa5af2070dfc27bf9fa990590ce6..a4346b1e87488935551807d535fd1a6e548e08f7 100644 (file)
        ;MorePrivacy = no
 
        # Normally ngIRCd doesn't send any messages to a client until it is
-       # registered. Enable this option to let the daemon send "NOTICE AUTH"
+       # registered. Enable this option to let the daemon send "NOTICE *"
        # messages to clients while connecting.
-       ;NoticeAuth = no
+       ;NoticeBeforeRegistration = no
 
        # Should IRC Operators be allowed to use the MODE command even if
        # they are not(!) channel-operators?
index 9040043d9db8003ce997d9851454c223badf3f7d..8c62709cdf2758802f5febf5901ab9c8d30d16ab 100644 (file)
@@ -299,9 +299,9 @@ anonymizing software such as TOR or I2P and one does not wish to make it
 too easy to collect statistics on the users.
 Default: no.
 .TP
-\fBNoticeAuth\fR (boolean)
+\fBNoticeBeforeRegistration\fR (boolean)
 Normally ngIRCd doesn't send any messages to a client until it is registered.
-Enable this option to let the daemon send "NOTICE AUTH" messages to clients
+Enable this option to let the daemon send "NOTICE *" messages to clients
 while connecting. Default: no.
 .TP
 \fBOperCanUseMode\fR (boolean)
index 221e7a96e8621c37b6f2db3d26d4c0accdf9075a..5f8bce5ddbad35586588454a9d9813a7cd63cbbc 100644 (file)
@@ -412,7 +412,7 @@ Conf_Test( void )
 #endif
        printf("  IncludeDir = %s\n", Conf_IncludeDir);
        printf("  MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
-       printf("  NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
+       printf("  NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
        printf("  OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
        printf("  OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
        printf("  OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
@@ -797,7 +797,7 @@ Set_Defaults(bool InitServers)
 #endif
        strcpy(Conf_IncludeDir, "");
        Conf_MorePrivacy = false;
-       Conf_NoticeAuth = false;
+       Conf_NoticeBeforeRegistration = false;
        Conf_OperCanMode = false;
        Conf_OperChanPAutoOp = true;
        Conf_OperServerMode = false;
@@ -1796,8 +1796,8 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
                Conf_MorePrivacy = Check_ArgIsTrue(Arg);
                return;
        }
-       if (strcasecmp(Var, "NoticeAuth") == 0) {
-               Conf_NoticeAuth = Check_ArgIsTrue(Arg);
+       if (strcasecmp(Var, "NoticeBeforeRegistration") == 0 || strcasecmp(Var, "NoticeAuth") == 0) {
+               Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
                return;
        }
        if (strcasecmp(Var, "OperCanUseMode") == 0) {
index aa80b8dd94942536c29ff4fce85c18e316e591ce..70de20af9edbb6321b739eac123124baa74e5575 100644 (file)
@@ -194,8 +194,8 @@ GLOBAL bool Conf_Ident;
 /** Enable "more privacy" mode and "censor" some user-related information */
 GLOBAL bool Conf_MorePrivacy;
 
-/** Enable NOTICE AUTH messages on connect */
-GLOBAL bool Conf_NoticeAuth;
+/** Enable "NOTICE *" messages on connect */
+GLOBAL bool Conf_NoticeBeforeRegistration;
 
 /** Enable all usage of PAM, even when compiled with support for it */
 GLOBAL bool Conf_PAM;
index 62561544866413f5abb1534da27caac1e2aa2218..6b3b51eaf5c10dc6b8555d8a99b53dee3b178a79 100644 (file)
@@ -1487,16 +1487,16 @@ Conn_StartLogin(CONN_ID Idx)
                ident_sock = My_Connections[Idx].sock;
 #endif
 
-       if (Conf_NoticeAuth) {
-               /* Send "NOTICE AUTH" messages to the client */
+       if (Conf_NoticeBeforeRegistration) {
+               /* Send "NOTICE *" messages to the client */
 #ifdef IDENTAUTH
                if (Conf_Ident)
                        (void)Conn_WriteStr(Idx,
-                               "NOTICE AUTH :*** Looking up your hostname and checking ident");
+                               "NOTICE * :*** Looking up your hostname and checking ident");
                else
 #endif
                        (void)Conn_WriteStr(Idx,
-                               "NOTICE AUTH :*** Looking up your hostname");
+                               "NOTICE * :*** Looking up your hostname");
                /* Send buffered data to the client, but break on errors
                 * because Handle_Write() would have closed the connection
                 * again in this case! */
@@ -2265,9 +2265,9 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
                strlcpy(My_Connections[i].host, readbuf,
                        sizeof(My_Connections[i].host));
                Client_SetHostname(c, readbuf);
-               if (Conf_NoticeAuth)
+               if (Conf_NoticeBeforeRegistration)
                        (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** Found your hostname: %s",
+                                       "NOTICE * :*** Found your hostname: %s",
                                        My_Connections[i].host);
 #ifdef IDENTAUTH
                ++identptr;
@@ -2291,22 +2291,22 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
                                    i, identptr);
                                Client_SetUser(c, identptr, true);
                        }
-                       if (Conf_NoticeAuth) {
+                       if (Conf_NoticeBeforeRegistration) {
                                (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** Got %sident response%s%s",
+                                       "NOTICE * :*** Got %sident response%s%s",
                                        *ptr ? "invalid " : "",
                                        *ptr ? "" : ": ",
                                        *ptr ? "" : identptr);
                        }
                } else if(Conf_Ident) {
                        Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
-                       if (Conf_NoticeAuth)
+                       if (Conf_NoticeBeforeRegistration)
                                (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** No ident response");
+                                       "NOTICE * :*** No ident response");
                }
 #endif
 
-               if (Conf_NoticeAuth) {
+               if (Conf_NoticeBeforeRegistration) {
                        /* Send buffered data to the client, but break on
                         * errors because Handle_Write() would have closed
                         * the connection again in this case! */