diff options
author | Kian Kasad <kian@kasad.com> | 2021-02-10 03:58:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 06:58:30 -0500 |
commit | 02bbbe8389b41c4cde0d0167b413df12da85130f (patch) | |
tree | f8161615359d3ebbd4d2d757270d6d223ef99a93 | |
parent | 0.2.3 (diff) | |
download | kirc-02bbbe8389b41c4cde0d0167b413df12da85130f.tar.gz kirc-02bbbe8389b41c4cde0d0167b413df12da85130f.tar.bz2 kirc-02bbbe8389b41c4cde0d0167b413df12da85130f.tar.xz kirc-02bbbe8389b41c4cde0d0167b413df12da85130f.tar.zst kirc-02bbbe8389b41c4cde0d0167b413df12da85130f.zip |
fix printing of join/part messages when cdef is a substring of the actual channel name (#99)
-rw-r--r-- | kirc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -485,7 +485,7 @@ static void paramPrintNick(struct Param * p) { static void paramPrintPart(struct Param * p) { printf("%*s<-- \x1b[34;1m%s\x1b[0m", p->nicklen - 3, "", p->nickname); - if (p->channel != NULL && strstr(p->channel, cdef) == NULL) + if (p->channel != NULL && strcmp(p->channel+1, cdef)) printf(" [\x1b[33m%s\x1b[0m] ", p->channel); } @@ -495,7 +495,7 @@ static void paramPrintQuit(struct Param * p) { static void paramPrintJoin(struct Param * p) { printf("%*s--> \x1b[32;1m%s\x1b[0m", p->nicklen - 3, "", p->nickname); - if (p->channel != NULL && strstr(p->channel, cdef) == NULL) + if (p->channel != NULL && strcmp(p->channel+1, cdef)) printf(" [\x1b[33m%s\x1b[0m] ", p->channel); } |