summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-06-07 05:26:57 +0000
committerdd <dd@FreeBSD.org>2001-06-07 05:26:57 +0000
commit608ddbaef3abfdb3665ae0a62fc17f495897cf32 (patch)
treed962b81327d64cab79237e2e2e4cbba160b056f6 /libexec
parent87d6ade9a72dc391f9538f9dde76bf632de17905 (diff)
downloadFreeBSD-src-608ddbaef3abfdb3665ae0a62fc17f495897cf32.zip
FreeBSD-src-608ddbaef3abfdb3665ae0a62fc17f495897cf32.tar.gz
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?).
Diffstat (limited to 'libexec')
-rw-r--r--libexec/talkd/announce.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index dccd8d8..aec851f 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++;
OpenPOWER on IntegriCloud