summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client.c b/client.c
index b81732d..9b55fdd 100644
--- a/client.c
+++ b/client.c
@@ -485,6 +485,16 @@ static Filter *Filters[] = {
 	[CapUserhostInNamesBit] = filterUserhostInNames,
 };
 
+static bool hasTime(const char *line) {
+	if (!strncmp(line, "@time=", 6)) return true;
+	while (*line && *line != ' ') {
+		line += strcspn(line, "; ");
+		if (!strncmp(line, ";time=", 6)) return true;
+		if (*line == ';') line++;
+	}
+	return false;
+}
+
 void clientConsume(struct Client *client) {
 	struct timeval time;
 	const char *line = ringPeek(&time, client->consumer);
@@ -503,7 +513,7 @@ void clientConsume(struct Client *client) {
 		return;
 	}
 
-	if (client->caps & CapServerTime && !(stateCaps & CapServerTime)) {
+	if (client->caps & CapServerTime && !hasTime(line)) {
 		char ts[sizeof("YYYY-MM-DDThh:mm:ss")];
 		struct tm *tm = gmtime(&time.tv_sec);
 		strftime(ts, sizeof(ts), "%FT%T", tm);
t/bin/bin.7?id=ffabe8651dc4f75d073cbed1aba3e0754bc071cb&follow=1'>Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 4b7d5161a30645b0a23691687ef1aafdda62d3bb. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe