From 4513fdec5e9205c4cc4168e3e449882d0e67f660 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Thu, 7 Jun 2001 05:26:57 +0000
Subject: [PATCH] In the "Message from Talk_Daemon" announcement, print the
date as well as the current time. It's nice to know whether the talk request
you see was sent just a few minutes ago (assuming you didn't hear the bell),
or if it's been decaying for days (weeks?).
---
libexec/talkd/announce.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index dccd8d887b32..aec851f1c3e3 100644
--- a/libexec/talkd/announce.c
+++ b/libexec/talkd/announce.c
@@ -125,8 +125,10 @@ print_mesg(tty, tf, request, remote_machine)
max_size = max(max_size, sizes[i]);
i++;
(void)snprintf(line_buf[i], N_CHARS,
- "Message from Talk_Daemon@%s at %d:%02d ...",
- hostname, localclock->tm_hour , localclock->tm_min );
+ "Message from Talk_Daemon@%s at %d:%02d on %d/%.2d/%.2d ...",
+ hostname, localclock->tm_hour , localclock->tm_min,
+ localclock->tm_year + 1900, localclock->tm_mon,
+ localclock->tm_mday);
sizes[i] = strlen(line_buf[i]);
max_size = max(max_size, sizes[i]);
i++;