]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/numeric.c
Spelling fix: "nick name" -> "nickname"
[ngircd-alex.git] / src / ngircd / numeric.c
index 0440768c6151ccab7a5d8e3d043c2056e1b6d321..3fc8c461bf73f1455731bf21f818a63455cd619d 100644 (file)
@@ -63,14 +63,21 @@ Announce_Channel(CLIENT *Client, CHANNEL *Chan)
                assert(cl != NULL);
 
                if (njoin) {
-                       /* RFC 2813: send NJOIN with nick names and modes
+                       /* RFC 2813: send NJOIN with nicknames and modes
                         * (if user is channel operator or has voice) */
                        if (str[strlen(str) - 1] != ':')
                                strlcat(str, ",", sizeof(str));
-                       if (strchr(Channel_UserModes(Chan, cl), 'v'))
-                               strlcat(str, "+", sizeof(str));
+                       if (strchr(Channel_UserModes(Chan, cl), 'q'))
+                               strlcat(str, "~", sizeof(str));
+                       if (strchr(Channel_UserModes(Chan, cl), 'a'))
+                               strlcat(str, "&", sizeof(str));
                        if (strchr(Channel_UserModes(Chan, cl), 'o'))
                                strlcat(str, "@", sizeof(str));
+                       if (strchr(Channel_UserModes(Chan, cl), 'h'))
+                               strlcat(str, "%", sizeof(str));
+                       if (strchr(Channel_UserModes(Chan, cl), 'v'))
+                               strlcat(str, "+", sizeof(str));
+
                        strlcat(str, Client_ID(cl), sizeof(str));
 
                        /* Send the data if the buffer is "full" */
@@ -384,6 +391,10 @@ IRC_Num_ENDOFMOTD(CLIENT * Client, UNUSED REQUEST * Req)
        }
 #endif
 
+       if (!IRC_WriteStrClient(Client, "PING :%s",
+           Client_ID(Client_ThisServer())))
+               return DISCONNECTED;
+
        return CONNECTED;
 } /* IRC_Num_ENDOFMOTD */
 
@@ -409,12 +420,12 @@ IRC_Num_ISUPPORT(CLIENT * Client, REQUEST * Req)
                        if ((unsigned int)atol(value) == Conf_MaxNickLength - 1)
                                continue;
 
-                       /* Nick name length settings are different! */
+                       /* Nickname length settings are different! */
                        Log(LOG_ERR,
-                           "Peer uses incompatible nick name length (%d/%d)! Disconnecting ...",
+                           "Peer uses incompatible nickname length (%d/%d)! Disconnecting ...",
                            Conf_MaxNickLength - 1, atoi(value));
                        Conn_Close(Client_Conn(Client),
-                                  "Incompatible nick name length",
+                                  "Incompatible nickname length",
                                   NULL, false);
                        return DISCONNECTED;
                }