about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2009-03-05 16:04:36 +0100
committerAlexander Barton <alex@barton.de>2009-03-05 16:04:36 +0100
commitc09742c5189802103900fc84ded42f4f84f27ae9 (patch)
treec1e7a023ccc0f2ca31f7db6e507d063076704f02
parentc56ab962706c7b60ab649d77f317cd5086fad368 (diff)
downloadngircd-c09742c5189802103900fc84ded42f4f84f27ae9.tar.gz
ngircd-c09742c5189802103900fc84ded42f4f84f27ae9.zip
Enhance INFO command to report compile time, if available
-rw-r--r--ChangeLog1
-rw-r--r--src/ngircd/irc-info.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 38fb7f2f..e0d13652 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 
 ngIRCd Release 14~rc1
 
+  - The INFO command reports the compile time now (if available).
   - Spell check and enhance ngIRCd manual pages.
   - Channel mode changes: break on syntax errors in MODE command.
   - Support individual channel keys for pre-defined channels: introduce
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;