summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp14
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp12
2 files changed, 13 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index da5f904b30..cac75f3c7e 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -193,7 +193,7 @@ passed:
if (iNewEvent == GC_EVENT_MESSAGE) {
ShowPopup(si->hContact, si, g_chatApi.hIcons[ICON_MESSAGE], si->pszModule, si->ptszName, clr ? clr : g_chatApi.aFonts[9].color,
- TranslateT("%s%s says:%s %s"), bbStart, gce->ptszNick, bbEnd, g_chatApi.RemoveFormatting(gce->ptszText));
+ TranslateT("%s%s says:%s %s"), bbStart, gce->pszNick.w, bbEnd, g_chatApi.RemoveFormatting(gce->pszText.w));
}
else oldDoPopup(si, gce);
@@ -556,17 +556,17 @@ bool IsHighlighted(SESSION_INFO *si, GCEVENT *gce)
GCEVENT evTmp = *gce;
int dwMask = 0;
- if (gce->ptszText != nullptr)
+ if (gce->pszText.w != nullptr)
dwMask |= CMUCHighlight::MATCH_TEXT;
- if (gce->ptszNick != nullptr) {
+ if (gce->pszNick.w != nullptr) {
dwMask |= CMUCHighlight::MATCH_NICKNAME;
if (si && g_Settings.bLogClassicIndicators) {
- size_t len = mir_wstrlen(gce->ptszNick) + 1;
+ size_t len = mir_wstrlen(gce->pszNick.w) + 1;
wchar_t *tmp = (wchar_t*)_alloca(sizeof(wchar_t)*(len + 1));
- *tmp = GetIndicator(si, gce->ptszNick, nullptr);
- mir_wstrcpy(tmp + 1, gce->ptszNick);
- evTmp.ptszNick = tmp;
+ *tmp = GetIndicator(si, gce->pszNick.w, nullptr);
+ mir_wstrcpy(tmp + 1, gce->pszNick.w);
+ evTmp.pszNick.w = tmp;
}
}
return g_Settings.Highlight->match(&evTmp, si, dwMask);
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index bf60e719a5..d69b6c7393 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -118,7 +118,7 @@ bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dw
return false;
if ((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && (m_fHighlightMe || m_iTextPatterns > 0) && psi != nullptr) {
- wchar_t *p = g_chatApi.RemoveFormatting(pgce->ptszText);
+ wchar_t *p = g_chatApi.RemoveFormatting(pgce->pszText.w);
p = NEWWSTR_ALLOCA(p);
if (p == nullptr)
return false;
@@ -164,12 +164,12 @@ bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dw
skip_textpatterns:
// optionally, match the nickname against the list of nicks to highlight
- if ((m_dwFlags & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) && pgce->ptszNick && m_iNickPatterns > 0) {
+ if ((m_dwFlags & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) && pgce->pszNick.w && m_iNickPatterns > 0) {
for (UINT i = 0; i < m_iNickPatterns && !nResult; i++) {
- if (pgce->ptszNick)
- nResult = wildcmpw(pgce->ptszNick, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
- if ((m_dwFlags & MATCH_UIN) && pgce->ptszUserInfo)
- nResult = wildcmpw(pgce->ptszUserInfo, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
+ if (pgce->pszNick.w)
+ nResult = wildcmpw(pgce->pszNick.w, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
+ if ((m_dwFlags & MATCH_UIN) && pgce->pszUserInfo.w)
+ nResult = wildcmpw(pgce->pszUserInfo.w, m_NickPatterns[i]) ? MATCH_NICKNAME : 0;
}
}