diff options
author | June McEnroe <june@causal.agency> | 2020-02-10 20:58:14 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-10 20:58:14 -0500 |
commit | 36e0bbc4cd783a826313de57fe77edf35e912d49 (patch) | |
tree | 08a9e680c059239ed836258b0f0def341acdfba2 | |
parent | Replace alignment tabs with spaces in bufferList (diff) | |
download | catgirl-36e0bbc4cd783a826313de57fe77edf35e912d49.tar.gz catgirl-36e0bbc4cd783a826313de57fe77edf35e912d49.zip |
Split on <> in colorMentions
This allows it to color the nick in the common case of pasting "<nick> something they said" into the chat. Technically it should color the brackets too but that would be too much work.
Diffstat (limited to '')
-rw-r--r-- | handle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/handle.c b/handle.c index 0db7fd9..ce56a51 100644 --- a/handle.c +++ b/handle.c @@ -510,11 +510,11 @@ static const char *colorMentions(size_t id, struct Message *msg) { if (!str) err(EX_OSERR, "fmemopen"); while (*mention) { - size_t skip = strspn(mention, ", "); + size_t skip = strspn(mention, ",<> "); fwrite(mention, skip, 1, str); mention += skip; - size_t len = strcspn(mention, ", "); + size_t len = strcspn(mention, ",<> "); char punct = mention[len]; mention[len] = '\0'; fprintf(str, "\3%02d%s\3", completeColor(id, mention), mention); |