]> granicus.if.org Git - ngircd/commitdiff
New numeric 329: get channel creation time on "MODE #chan" commands
authorAlexander Barton <alex@barton.de>
Thu, 11 Nov 2010 11:39:49 +0000 (12:39 +0100)
committerAlexander Barton <alex@barton.de>
Thu, 11 Nov 2010 11:39:49 +0000 (12:39 +0100)
src/ngircd/irc-mode.c
src/ngircd/messages.h

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;
 }
 
 
index 03ddc363375c7633abd0234761eee4c8b2d67353..900d2ff1101a9f80d77cc6efc75194ca48fa07a4 100644 (file)
@@ -65,6 +65,7 @@
 #define RPL_LIST_MSG                   "322 %s %s %ld :%s"
 #define RPL_LISTEND_MSG                        "323 %s :End of LIST"
 #define RPL_CHANNELMODEIS_MSG          "324 %s %s +%s"
+#define RPL_CREATIONTIME_MSG           "329 %s %s %ld"
 #define RPL_NOTOPIC_MSG                        "331 %s %s :No topic is set"
 #define RPL_TOPIC_MSG                  "332 %s %s :%s"
 #define RPL_TOPICSETBY_MSG             "333 %s %s %s %u"