Module: ngircd.git Branch: master Commit: 7321be2ccd861f1a260e16bf8ddbd32490fbc340 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=7321b...
Author: Alexander Barton alex@barton.de Date: Thu Nov 11 12:39:49 2010 +0100
New numeric 329: get channel creation time on "MODE #chan" commands
---
src/ngircd/irc-mode.c | 13 +++++++++++-- src/ngircd/messages.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index df464a7..a4c1d89 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -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; }
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h index 03ddc36..900d2ff 100644 --- a/src/ngircd/messages.h +++ b/src/ngircd/messages.h @@ -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"