Match mentions case-sensitively
The mention coloring code already matches case-sensitively, and any proper ping should be using tab-complete anyway so there's no reason for differing case. And the month of June should not ping me.weechat-hashes
parent
1891c77535
commit
b06470294d
2
handle.c
2
handle.c
|
@ -1061,7 +1061,7 @@ static bool isAction(struct Message *msg) {
|
||||||
static bool isMention(const struct Message *msg) {
|
static bool isMention(const struct Message *msg) {
|
||||||
size_t len = strlen(self.nick);
|
size_t len = strlen(self.nick);
|
||||||
const char *match = msg->params[1];
|
const char *match = msg->params[1];
|
||||||
while (NULL != (match = strcasestr(match, self.nick))) {
|
while (NULL != (match = strstr(match, self.nick))) {
|
||||||
char a = (match > msg->params[1] ? match[-1] : ' ');
|
char a = (match > msg->params[1] ? match[-1] : ' ');
|
||||||
char b = (match[len] ?: ' ');
|
char b = (match[len] ?: ' ');
|
||||||
if ((isspace(a) || ispunct(a)) && (isspace(b) || ispunct(b))) {
|
if ((isspace(a) || ispunct(a)) && (isspace(b) || ispunct(b))) {
|
||||||
|
|
Loading…
Reference in New Issue