]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Streamline punctuation of log messages
[ngircd-alex.git] / src / ngircd / irc-login.c
index 977fc54666e75ee8e5d753104cd46512f8471382..e7d83eff301c3491c83d71f9892944c0f6e5c480 100644 (file)
@@ -443,7 +443,7 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
                   punctuation is allowed.*/
                ptr = Req->argv[0];
                while (*ptr) {
-                       if (!isalnum(*ptr) &&
+                       if (!isalnum((int)*ptr) &&
                            *ptr != '+' && *ptr != '-' &&
                            *ptr != '.' && *ptr != '_') {
                                Conn_Close(Client_Conn(Client), NULL,
@@ -691,11 +691,11 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
                }
 
                if (target != Client) {
-                       Client_Destroy(target, "Got QUIT command.",
+                       Client_Destroy(target, "Got QUIT command",
                                       Req->argc == 1 ? quitmsg : NULL, true);
                        return CONNECTED;
                } else {
-                       Conn_Close(Client_Conn(Client), "Got QUIT command.",
+                       Conn_Close(Client_Conn(Client), "Got QUIT command",
                                   Req->argc == 1 ? quitmsg : NULL, true);
                        return DISCONNECTED;
                }
@@ -708,7 +708,7 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
                }
 
                /* User, Service, or not yet registered */
-               Conn_Close(Client_Conn(Client), "Got QUIT command.",
+               Conn_Close(Client_Conn(Client), "Got QUIT command",
                           Req->argc == 1 ? quitmsg : NULL, true);
 
                return DISCONNECTED;
@@ -907,8 +907,9 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
 
        if (Client_Type(Client) == CLIENT_SERVER && Conn_LastPing(conn) == 0) {
                Log(LOG_INFO,
-                   "Synchronization with \"%s\" done (connection %d): %ld seconds [%ld users, %ld channels]",
+                   "Synchronization with \"%s\" done (connection %d): %ld second%s [%ld users, %ld channels].",
                    Client_ID(Client), conn, time(NULL) - Conn_GetSignon(conn),
+                   time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
                    Client_UserCount(), Channel_CountVisible(NULL));
                Conn_UpdatePing(conn);
        } else
@@ -938,7 +939,7 @@ Kill_Nick(char *Nick, char *Reason)
        r.argv[1] = Reason;
        r.argc = 2;
 
-       Log(LOG_ERR, "User(s) with nick \"%s\" will be disconnected: %s",
+       Log(LOG_ERR, "User(s) with nick \"%s\" will be disconnected: %s!",
            Nick, Reason);
 
        IRC_KILL(Client_ThisServer(), &r);
@@ -971,7 +972,7 @@ Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool InformClient)
 
        /* Inform all servers and users (which have to know) of the new name */
        if (InformClient) {
-               IRC_WriteStrClientPrefix(Target, Origin, "NICK :%s", NewNick);
+               IRC_WriteStrClientPrefix(Target, Target, "NICK :%s", NewNick);
                IRC_WriteStrServersPrefix(NULL, Target, "NICK :%s", NewNick);
        } else
                IRC_WriteStrServersPrefix(Origin, Target, "NICK :%s", NewNick);