From 4fb10322d1a4ba8617dd6f53eda5f5002158d659 Mon Sep 17 00:00:00 2001 From: vague666 Date: Mon, 26 Oct 2020 10:57:05 +0100 Subject: [PATCH] Optimize execution --- src/fe-common/core/hilight-text.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 22e46ffa..fc213533 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -272,12 +272,11 @@ HILIGHT_REC *hilight_match(SERVER_REC *server, const char *channel, for (tmp = hilights; tmp != NULL; tmp = tmp->next) { HILIGHT_REC *rec = tmp->data; - if (!rec->nickmask && hilight_match_level(rec, level) && - hilight_match_channel(rec, channel) && + if (rec->priority > priority && !rec->nickmask && + hilight_match_level(rec, level) && hilight_match_channel(rec, channel) && (rec->servertag == NULL || (server != NULL && g_ascii_strcasecmp(rec->servertag, server->tag) == 0)) && - hilight_match_text(rec, str, match_beg, match_end) && - rec->priority > priority) { + hilight_match_text(rec, str, match_beg, match_end)) { tmprec = rec; priority = rec->priority; }