From c09742c5189802103900fc84ded42f4f84f27ae9 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 5 Mar 2009 16:04:36 +0100 Subject: Enhance INFO command to report compile time, if available --- src/ngircd/irc-info.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 4ac2a478..e9345217 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -133,8 +133,14 @@ IRC_INFO(CLIENT * Client, REQUEST * Req) if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), NGIRCd_Version)) return DISCONNECTED; - - strlcpy(msg, "Server has been started ", sizeof(msg)); + +#if defined(__DATE__) && defined(__TIME__) + snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__); + if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg)) + return DISCONNECTED; +#endif + + strlcpy(msg, "On-line since ", sizeof(msg)); strlcat(msg, NGIRCd_StartStr, sizeof(msg)); if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg)) return DISCONNECTED; -- cgit 1.4.1