]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-mode.c
New numeric 329: get channel creation time on "MODE #chan" commands
[ngircd-alex.git] / src / ngircd / irc-mode.c
index df464a7dba7efca0058cdede4d18ec8090a7eeea..a4c1d89b330ed175bb02ea158c595693a22be11e 100644 (file)
@@ -294,8 +294,17 @@ Channel_Mode_Answer_Request(CLIENT *Origin, CHANNEL *Channel)
        if (the_args[0])
                strlcat(the_modes, the_args, sizeof(the_modes));
 
-       return IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
-               Client_ID(Origin), Channel_Name(Channel), the_modes);
+       if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
+                               Client_ID(Origin), Channel_Name(Channel),
+                               the_modes))
+               return DISCONNECTED;
+#ifndef STRICT_RFC
+       if (!IRC_WriteStrClient(Origin, RPL_CREATIONTIME_MSG,
+                                 Client_ID(Origin), Channel_Name(Channel),
+                                 Channel_CreationTime(Channel)))
+               return DISCONNECTED;
+#endif
+       return CONNECTED;
 }