Update MessageDialog.cpp
This commit is contained in:
parent
cbf1e8db8f
commit
6a2eb426a7
|
@ -149,6 +149,8 @@ void CMessageDialog::ReloadConf()
|
||||||
|
|
||||||
while (m_hidden.GetSize()) {
|
while (m_hidden.GetSize()) {
|
||||||
entry = (HideEntry *)m_hidden.GetAt(0);
|
entry = (HideEntry *)m_hidden.GetAt(0);
|
||||||
|
if(entry->pattern)
|
||||||
|
Pattern_Free(entry->pattern);
|
||||||
delete entry;
|
delete entry;
|
||||||
m_hidden.RemoveAt(0);
|
m_hidden.RemoveAt(0);
|
||||||
}
|
}
|
||||||
|
@ -185,6 +187,8 @@ void CMessageDialog::ReloadConf()
|
||||||
//entry->detail = head.Mid(pos + 1);
|
//entry->detail = head.Mid(pos + 1);
|
||||||
entry->pattern = Pattern_Create(NULL, head.Mid(pos + 1), TRUE, 0);
|
entry->pattern = Pattern_Create(NULL, head.Mid(pos + 1), TRUE, 0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
entry->pattern = NULL;
|
||||||
|
|
||||||
if (entry->code)
|
if (entry->code)
|
||||||
m_hidden.Add(entry);
|
m_hidden.Add(entry);
|
||||||
|
@ -234,7 +238,7 @@ BOOL CMessageDialog::IsHiddenMessage(
|
||||||
// (entry->detail.CompareNoCase(detail_1) == 0);
|
// (entry->detail.CompareNoCase(detail_1) == 0);
|
||||||
CString Detail_1 = detail_1;
|
CString Detail_1 = detail_1;
|
||||||
Detail_1.MakeLower();
|
Detail_1.MakeLower();
|
||||||
BOOL match = Pattern_Match(entry->pattern, Detail_1, Detail_1.GetLength());
|
BOOL match = !entry->pattern || Pattern_Match(entry->pattern, Detail_1, Detail_1.GetLength());
|
||||||
if (match)
|
if (match)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue