mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Add prio check to hilight_nick_cache also
This commit is contained in:
parent
4fb10322d1
commit
8f4f0be6d4
@ -674,6 +674,7 @@ static void hilight_nick_cache(GHashTable *list, CHANNEL_REC *channel,
|
|||||||
HILIGHT_REC *match;
|
HILIGHT_REC *match;
|
||||||
char *nickmask;
|
char *nickmask;
|
||||||
int len, best_match;
|
int len, best_match;
|
||||||
|
int priority = -1;
|
||||||
|
|
||||||
if (nick->host == NULL)
|
if (nick->host == NULL)
|
||||||
return; /* don't check until host is known */
|
return; /* don't check until host is known */
|
||||||
@ -684,11 +685,12 @@ static void hilight_nick_cache(GHashTable *list, CHANNEL_REC *channel,
|
|||||||
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
||||||
HILIGHT_REC *rec = tmp->data;
|
HILIGHT_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->nickmask &&
|
if (rec->priority > priority && rec->nickmask &&
|
||||||
hilight_match_channel(rec, channel->name) &&
|
hilight_match_channel(rec, channel->name) &&
|
||||||
match_wildcards(rec->text, nickmask)) {
|
match_wildcards(rec->text, nickmask)) {
|
||||||
len = strlen(rec->text);
|
len = strlen(rec->text);
|
||||||
if (best_match < len) {
|
if (best_match < len) {
|
||||||
|
priority = rec->priority;
|
||||||
best_match = len;
|
best_match = len;
|
||||||
match = rec;
|
match = rec;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user