]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
Use "NOTICE *" before registration instead of "NOTICE AUTH".
[ngircd-alex.git] / src / ngircd / conn.c
index 77c8cd8a04ae7c6dca8958663326b52a34053180..daf496b4186a58d3f43ba8c22339918a318e05e1 100644 (file)
@@ -1488,15 +1488,15 @@ Conn_StartLogin(CONN_ID Idx)
 #endif
 
        if (Conf_NoticeAuth) {
-               /* Send "NOTICE AUTH" messages to the client */
+               /* 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! */
@@ -1693,7 +1693,12 @@ Handle_Buffer(CONN_ID Idx)
                        maxcmd *= 5;
                break;
            case CLIENT_SERVICE:
-               maxcmd = MAX_COMMANDS_SERVICE; break;
+               maxcmd = MAX_COMMANDS_SERVICE;
+               break;
+           case CLIENT_USER:
+               if (Client_HasMode(c, 'F'))
+                       maxcmd = MAX_COMMANDS_SERVICE;
+               break;
        }
 
        for (i=0; i < maxcmd; i++) {
@@ -1899,7 +1904,7 @@ Check_Servers(void)
        for (i = 0; i < MAX_SERVERS; i++) {
                if (Conf_Server[i].conn_id != NONE)
                        continue;       /* Already establishing or connected */
-               if (!Conf_Server[i].host[0] || !Conf_Server[i].port > 0)
+               if (!Conf_Server[i].host[0] || Conf_Server[i].port <= 0)
                        continue;       /* No host and/or port configured */
                if (Conf_Server[i].flags & CONF_SFLAG_DISABLED)
                        continue;       /* Disabled configuration entry */
@@ -2262,7 +2267,7 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
                Client_SetHostname(c, readbuf);
                if (Conf_NoticeAuth)
                        (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** Found your hostname: %s",
+                                       "NOTICE * :*** Found your hostname: %s",
                                        My_Connections[i].host);
 #ifdef IDENTAUTH
                ++identptr;
@@ -2288,7 +2293,7 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
                        }
                        if (Conf_NoticeAuth) {
                                (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** Got %sident response%s%s",
+                                       "NOTICE * :*** Got %sident response%s%s",
                                        *ptr ? "invalid " : "",
                                        *ptr ? "" : ": ",
                                        *ptr ? "" : identptr);
@@ -2297,7 +2302,7 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
                        Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
                        if (Conf_NoticeAuth)
                                (void)Conn_WriteStr(i,
-                                       "NOTICE AUTH :*** No ident response");
+                                       "NOTICE * :*** No ident response");
                }
 #endif
 
@@ -2427,6 +2432,10 @@ Throttle_Connection(const CONN_ID Idx, CLIENT *Client, const int Reason,
            || Client_Type(Client) == CLIENT_SERVICE)
                return;
 
+       /* Don't throttle clients with user mode 'F' set */
+       if (Client_HasMode(Client, 'F'))
+               return;
+
        LogDebug("Throttling connection %d: code %d, value %d!", Idx,
                 Reason, Value);
        Conn_SetPenalty(Idx, 1);