]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/channel.c
Update error messages for user mode +b and channel Mode +M.
[ngircd-alex.git] / src / ngircd / channel.c
index f3c74dc651f10abf72aab2d0ce5856da8a5e6c5e..00aafe05a170102a3e22053af73861b50b14e112 100644 (file)
@@ -918,7 +918,11 @@ Channel_Write(CHANNEL *Chan, CLIENT *From, CLIENT *Client, const char *Command,
        if (!Can_Send_To_Channel(Chan, From)) {
                if (! SendErrors)
                        return CONNECTED;       /* no error, see RFC 2812 */
-               return IRC_WriteStrClient(From, ERR_CANNOTSENDTOCHAN_MSG,
+               if (strchr(Channel_Modes(Chan), 'M'))
+                       return IRC_WriteStrClient(From, ERR_NEEDREGGEDNICK_MSG,
+                                                 Client_ID(From), Channel_Name(Chan));
+               else
+                       return IRC_WriteStrClient(From, ERR_CANNOTSENDTOCHAN_MSG,
                                          Client_ID(From), Channel_Name(Chan));
        }