From 8f9a58e181d16cad2b86b8116bfe9470774bbdee Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 18 Jul 2019 20:04:22 +0100 Subject: Correctly log and replay "/me" PRIVMSGs. --- replay.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'replay.c') diff --git a/replay.c b/replay.c index f4635c1..5e54f28 100644 --- a/replay.c +++ b/replay.c @@ -101,6 +101,7 @@ void formattime(char *str) { int len = strlen(str); // Find the start of the message if it's a PRIVMSG + // TODO - What if this string happens to appear in a non-PRIVMSG? char *ret; int pos1; if ((ret = strstr(str, "PRIVMSG")) != NULL) { @@ -111,6 +112,13 @@ void formattime(char *str) { return; } + // Make sure it's not a "/me" line + // TODO - What if this string happens to appear in a non-PRIVMSG? + if (strstr(str, " :\1ACTION ")) { + // If so, stop here + return; + } + char *ret2; int pos2; // Find the start of the actual message within the PRIVMSG -- cgit v1.2.3