diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-07-18 20:04:22 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-07-18 20:04:22 +0100 |
commit | 8f9a58e181d16cad2b86b8116bfe9470774bbdee (patch) | |
tree | c6defd0c68707ae51ff3d8affa19267ed853c440 /replay.c | |
parent | 40a9f76e2d4ddd972b2e9ea2594c7567718517f4 (diff) |
Correctly log and replay "/me" PRIVMSGs.
Diffstat (limited to 'replay.c')
-rw-r--r-- | replay.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |