summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index 8bc2dea134..0e34837673 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -164,11 +164,28 @@ skip_textpatterns:
// optionally, match the nickname against the list of nicks to highlight
if ((m_iMode & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) && pgce->pszNick.w && m_iNickPatterns > 0) {
+ DBEVENTINFO dbei = {};
+ if (pgce->hEvent)
+ db_event_get(pgce->hEvent, &dbei);
+
for (UINT i = 0; i < m_iNickPatterns && !nResult; i++) {
if (pgce->pszNick.w)
- nResult = wildcmpw(pgce->pszNick.w, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
+ if (wildcmpw(pgce->pszNick.w, m_NickPatterns[i])) {
+ nResult = MATCH_NICKNAME;
+ break;
+ }
+
+ if (dbei.szReplyId)
+ if (wildcmpw(_A2T(dbei.szReplyId), m_NickPatterns[i])) {
+ nResult = MATCH_NICKNAME;
+ break;
+ }
+
if ((m_iMode & MATCH_UIN) && pgce->pszUserInfo.w)
- nResult = wildcmpw(pgce->pszUserInfo.w, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
+ if (wildcmpw(pgce->pszUserInfo.w, m_NickPatterns[i])) {
+ nResult = MATCH_NICKNAME;
+ break;
+ }
}
}