From 3b867362e40fbdf02af08febfdb70074b8f63eea Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 29 Oct 2019 19:34:28 +0300 Subject: code cleaning --- plugins/TabSRMM/src/msgs.h | 34 +++++++++++++++++----------------- plugins/TabSRMM/src/muchighlight.cpp | 8 ++++---- plugins/TabSRMM/src/muchighlight.h | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 28ce4e8503..3ad867b1ae 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -40,23 +40,23 @@ #define CONTAINER_NAMELEN 25 #define TITLE_FORMATLEN 30 -#define MWF_LOG_BBCODE 1 -#define MWF_LOG_LOCALTIME 64 -#define MWF_LOG_NORMALTEMPLATES 512 -#define MWF_LOG_SHOWTIME 1024 -#define MWF_LOG_SHOWSECONDS 2048 -#define MWF_LOG_SHOWDATES 4096 -#define MWF_LOG_NEWLINE 8192 -#define MWF_LOG_INDENT 16384 -#define MWF_LOG_RTL 32768 -#define MWF_LOG_UNDERLINE 65536 -#define MWF_LOG_SWAPNICK 131072 -#define MWF_LOG_SHOWICONS 262144 -#define MWF_LOG_SYMBOLS 0x200000 -#define MWF_LOG_TEXTFORMAT 0x2000000 -#define MWF_LOG_GRID 0x4000000 -#define MWF_LOG_INOUTICONS 0x10000000 -#define MWF_LOG_GROUPMODE 0x80000000 +#define MWF_LOG_BBCODE 0x01 +#define MWF_LOG_LOCALTIME 0x40 +#define MWF_LOG_NORMALTEMPLATES 0x200 +#define MWF_LOG_SHOWTIME 0x400 +#define MWF_LOG_SHOWSECONDS 0x800 +#define MWF_LOG_SHOWDATES 0x1000 +#define MWF_LOG_NEWLINE 0x2000 +#define MWF_LOG_INDENT 0x4000 +#define MWF_LOG_RTL 0x8000 +#define MWF_LOG_UNDERLINE 0x10000 +#define MWF_LOG_SWAPNICK 0x20000 +#define MWF_LOG_SHOWICONS 0x40000 +#define MWF_LOG_SYMBOLS 0x200000 +#define MWF_LOG_TEXTFORMAT 0x2000000 +#define MWF_LOG_GRID 0x4000000 +#define MWF_LOG_INOUTICONS 0x10000000 +#define MWF_LOG_GROUPMODE 0x80000000 #define SMODE_DEFAULT 0 #define SMODE_MULTIPLE 1 diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp index d69b6c7393..707226458f 100644 --- a/plugins/TabSRMM/src/muchighlight.cpp +++ b/plugins/TabSRMM/src/muchighlight.cpp @@ -58,7 +58,7 @@ void CMUCHighlight::init() if (0 == db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv)) m_NickPatternString = dbv.pwszVal; - m_dwFlags = db_get_b(0, CHAT_MODULE, "HighlightEnabled", MATCH_TEXT); + m_iMode = db_get_b(0, CHAT_MODULE, "HighlightEnabled", MATCH_TEXT); m_fHighlightMe = (db_get_b(0, CHAT_MODULE, "HighlightMe", 1) ? true : false); tokenize(m_TextPatternString, m_TextPatterns, m_iTextPatterns); @@ -117,7 +117,7 @@ bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dw if (pgce == nullptr || m_Valid == false) return false; - if ((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && (m_fHighlightMe || m_iTextPatterns > 0) && psi != nullptr) { + if ((m_iMode & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && (m_fHighlightMe || m_iTextPatterns > 0) && psi != nullptr) { wchar_t *p = g_chatApi.RemoveFormatting(pgce->pszText.w); p = NEWWSTR_ALLOCA(p); if (p == nullptr) @@ -164,11 +164,11 @@ 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->pszNick.w && m_iNickPatterns > 0) { + if ((m_iMode & MATCH_NICKNAME) && (dwFlags & MATCH_NICKNAME) && pgce->pszNick.w && m_iNickPatterns > 0) { 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 ((m_dwFlags & MATCH_UIN) && pgce->pszUserInfo.w) + if ((m_iMode & MATCH_UIN) && pgce->pszUserInfo.w) nResult = wildcmpw(pgce->pszUserInfo.w, m_NickPatterns[i]) ? MATCH_NICKNAME : 0; } } diff --git a/plugins/TabSRMM/src/muchighlight.h b/plugins/TabSRMM/src/muchighlight.h index 46f0458fa0..19307ed6db 100644 --- a/plugins/TabSRMM/src/muchighlight.h +++ b/plugins/TabSRMM/src/muchighlight.h @@ -55,7 +55,7 @@ public: private: void tokenize(wchar_t *tszString, wchar_t** &patterns, UINT &nr); - DWORD m_dwFlags = 0; + DWORD m_iMode = 0; // combination of MATCH_* masks UINT m_iNickPatterns = 0; UINT m_iTextPatterns = 0; bool m_fInitialized = false; -- cgit v1.2.3