Merge pull request #213 from Georgiy-Tugai/patch-1

Fix highlight match behaviour
This commit is contained in:
dgw 2019-05-21 03:12:03 -04:00 committed by GitHub
commit 78d0385f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 12 deletions

View File

@ -922,9 +922,6 @@ class CPushMod : public CModule
options["highlight"].Split(" ", values, false); options["highlight"].Split(" ", values, false);
values.push_back("%nick%"); values.push_back("%nick%");
bool matched = false;
bool negated = false;
for (VCString::iterator i = values.begin(); i != values.end(); i++) for (VCString::iterator i = values.begin(); i != values.end(); i++)
{ {
CString value = i->AsLower(); CString value = i->AsLower();
@ -955,18 +952,11 @@ class CPushMod : public CModule
if (msg.WildCmp(value)) if (msg.WildCmp(value))
{ {
if (negate_match) return !negate_match;
{
negated = true;
}
else
{
matched = true;
}
} }
} }
return (matched && !negated); return false;
} }
/** /**