summaryrefslogtreecommitdiff
path: root/replay.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-07-18 20:04:22 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-07-18 20:04:22 +0100
commit8f9a58e181d16cad2b86b8116bfe9470774bbdee (patch)
treec6defd0c68707ae51ff3d8affa19267ed853c440 /replay.c
parent40a9f76e2d4ddd972b2e9ea2594c7567718517f4 (diff)
Correctly log and replay "/me" PRIVMSGs.
Diffstat (limited to 'replay.c')
-rw-r--r--replay.c8
1 files changed, 8 insertions, 0 deletions
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