From 2ec5040dda86f76532d48302fede21866916954a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 28 Oct 2015 08:32:01 +0000 Subject: Optimize ME_DB_CONTACT_SETTINGCHANGED functions to not use mir_strcmp() but just strcmp() (and similar methods) It's not needed to user mir_* for checking null pointers when we're comparing const strings with DBCONTACTWRITESETTING values which should be always initialized correctly. Somewhere also changed strcmpi to just strcmp, because these settings are case-sensitive anyway. git-svn-id: http://svn.miranda-ng.org/main/trunk@15631 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/main.cpp | 2 +- plugins/AuthState/src/main.cpp | 4 +-- plugins/AutoShutdown/src/watcher.cpp | 4 +-- plugins/BASS_interface/src/Main.cpp | 4 +-- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 2 +- plugins/BuddyPounce/src/main.cpp | 2 +- .../ClientChangeNotify/src/ClientChangeNotify.cpp | 6 ++-- plugins/Clist_blind/src/clistopts.cpp | 2 +- plugins/Clist_modern/src/modern_clc.cpp | 32 +++++++++++----------- plugins/Clist_modern/src/modern_clistsettings.cpp | 26 +++++++++--------- plugins/Clist_modern/src/modern_toolbar.cpp | 10 +++---- plugins/Clist_nicer/src/clistopts.cpp | 2 +- plugins/CountryFlags/src/extraimg.cpp | 2 +- plugins/FingerprintNG/src/fingerprint.cpp | 2 +- plugins/FloatingContacts/src/main.cpp | 12 ++++---- plugins/IgnoreState/src/main.cpp | 6 ++-- plugins/ListeningTo/src/listeningto.cpp | 4 +-- plugins/MirOTR/src/dbfilter.cpp | 2 +- plugins/MirandaG15/src/CAppletManager.cpp | 12 ++++---- plugins/MobileState/src/main.cpp | 2 +- plugins/MyDetails/src/frame.cpp | 16 +++++------ plugins/NewAwaySysMod/src/AwaySys.cpp | 2 +- plugins/NewXstatusNotify/src/main.cpp | 4 +-- plugins/Rate/src/main.cpp | 2 +- plugins/RecentContacts/src/RecentContacts.cpp | 2 +- plugins/Scriver/src/msgs.cpp | 2 +- plugins/SecureIM/src/svcs_clist.cpp | 2 +- plugins/SeenPlugin/src/utils.cpp | 8 +++--- plugins/SmileyAdd/src/services.cpp | 2 +- plugins/StopSpamMod/src/stopspam.cpp | 4 +-- plugins/StopSpamPlus/src/events.cpp | 4 +-- plugins/TabSRMM/src/globals.cpp | 26 +++++++++--------- plugins/TipperYM/src/tipper.cpp | 2 +- plugins/TooltipNotify/src/TooltipNotify.cpp | 4 +-- plugins/TopToolBar/src/InternalButtons.cpp | 14 +++++----- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 6 ++-- plugins/UserInfoEx/src/dlg_propsheet.cpp | 4 +-- plugins/UserInfoEx/src/svc_contactinfo.cpp | 2 +- plugins/UserInfoEx/src/svc_email.cpp | 6 ++-- plugins/UserInfoEx/src/svc_gender.cpp | 2 +- plugins/UserInfoEx/src/svc_phone.cpp | 8 +++--- plugins/Variables/src/contact.cpp | 12 ++++---- plugins/WebView/src/webview_services.cpp | 6 ++-- plugins/WhenWasIt/src/hooked_events.cpp | 2 +- plugins/ZeroNotification/src/main.cpp | 2 +- plugins/wbOSD/src/events.cpp | 4 +-- protocols/MRA/src/Mra_svcs.cpp | 18 ++++++------ protocols/Tlen/src/tlen_svc.cpp | 16 +++++------ src/core/stdclist/src/clistopts.cpp | 2 +- src/core/stdmsg/src/msgs.cpp | 6 ++-- src/core/stduseronline/src/useronline.cpp | 2 +- src/mir_app/src/DefaultExtraIcons.cpp | 10 +++---- src/mir_app/src/clc.cpp | 32 +++++++++++----------- src/mir_app/src/clistevents.cpp | 6 ++-- src/mir_app/src/clistsettings.cpp | 16 +++++------ src/mir_app/src/meta_services.cpp | 16 +++++------ 56 files changed, 205 insertions(+), 205 deletions(-) diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index e48e8dc82d..11f0b0ec86 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -202,7 +202,7 @@ static int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; if (hContact == 0) - if (!mir_strcmp(cws->szSetting, "AvatarFile") || !mir_strcmp(cws->szSetting, "PictObject") || !mir_strcmp(cws->szSetting, "AvatarHash") || !mir_strcmp(cws->szSetting, "AvatarSaved")) + if (!strcmp(cws->szSetting, "AvatarFile") || !strcmp(cws->szSetting, "PictObject") || !strcmp(cws->szSetting, "AvatarHash") || !strcmp(cws->szSetting, "AvatarSaved")) ReportMyAvatarChanged((WPARAM)cws->szModule, 0); return 0; diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 6c88be6326..3de303b336 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -113,8 +113,8 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) char *proto = GetContactProto((MCONTACT)hContact); if (!proto) return 0; - if (!mir_strcmp(cws->szModule, proto)) - if (!mir_strcmp(cws->szSetting, "Auth") || !mir_strcmp(cws->szSetting, "Grant") || !mir_strcmp(cws->szSetting, "ServerId") || !mir_strcmp(cws->szSetting, "ContactType")) + if (!strcmp(cws->szModule, proto)) + if (!strcmp(cws->szSetting, "Auth") || !strcmp(cws->szSetting, "Grant") || !strcmp(cws->szSetting, "ServerId") || !strcmp(cws->szSetting, "ContactType")) onExtraImageApplying(hContact, 1); return 0; diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 32fba6793e..efb456a82a 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -198,9 +198,9 @@ static int StatusSettingChanged(WPARAM wParam, LPARAM lParam) { if (currentWatcherType&SDWTF_STATUS) { DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; - if ((HANDLE)wParam != NULL && dbcws->value.wVal == ID_STATUS_OFFLINE && !mir_strcmp(dbcws->szSetting, "Status")) { + if ((HANDLE)wParam != NULL && dbcws->value.wVal == ID_STATUS_OFFLINE && !strcmp(dbcws->szSetting, "Status")) { char *pszProto = GetContactProto(wParam); - if (pszProto != NULL && !mir_strcmp(dbcws->szModule, pszProto)) + if (pszProto != NULL && !strcmp(dbcws->szModule, pszProto)) if (CheckAllContactsOffline()) ShutdownAndStopWatcher(); } diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index c27974f8b5..cb5d7cbea9 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -573,8 +573,8 @@ int OnSettingChanged(WPARAM wParam, LPARAM lParam) return 0; DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(dbcws->szModule, "Skin")) { - if (!mir_strcmp(dbcws->szSetting, "UseSound")) { + if (!strcmp(dbcws->szModule, "Skin")) { + if (!strcmp(dbcws->szSetting, "UseSound")) { EnableFrameIcon(dbcws->value.bVal != 0); return 0; } diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index ba83232e21..ceefadb950 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -459,7 +459,7 @@ int onExtraImageApplying(WPARAM hContact, LPARAM) int SettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING*)lParam; - if (hContact == NULL || inf->value.type == DBVT_DELETED || mir_strcmp(inf->szSetting, "Status") != 0) + if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0) return 0; if (db_get_b(hContact, "CList", "NotOnList", 0) == 1) diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 96268daa98..9aa3c6326e 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -153,7 +153,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; char *szProto = GetContactProto(hContact); - if(hContact == NULL || mir_strcmp(cws->szSetting,"Status")) return 0; + if(hContact == NULL || strcmp(cws->szSetting,"Status")) return 0; if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) { int newStatus = cws->value.wVal; int oldStatus = db_get_w(hContact,"UserOnline","OldStatus",ID_STATUS_OFFLINE); diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 442e65b31a..bd4ef8f69b 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -183,7 +183,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) int ContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (mir_strcmp(cws->szSetting, DB_MIRVER)) + if (strcmp(cws->szSetting, DB_MIRVER)) return 0; SHOWPOPUP_DATA sd = {0}; @@ -195,7 +195,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; _ASSERT(szProto); - if (!mir_strcmp(szProto, META_PROTO)) // workaround for metacontacts + if (!strcmp(szProto, META_PROTO)) // workaround for metacontacts return 0; sd.MirVer = db_get_s(hContact, szProto, DB_MIRVER, _T("")); @@ -234,7 +234,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) LPCTSTR ptszOldClient = Finger_GetClientDescr(sd.OldMirVer); LPCTSTR ptszClient = Finger_GetClientDescr(sd.MirVer); if (ptszOldClient && ptszClient) { - if (PerContactSetting != NOTIFY_ALMOST_ALWAYS && PerContactSetting != NOTIFY_ALWAYS && !PopupOptPage.GetValue(IDC_POPUPOPTDLG_VERCHGNOTIFY) && !mir_tstrcmp(ptszClient, ptszOldClient)) + if (PerContactSetting != NOTIFY_ALMOST_ALWAYS && PerContactSetting != NOTIFY_ALWAYS && !PopupOptPage.GetValue(IDC_POPUPOPTDLG_VERCHGNOTIFY) && !tstrcmp(ptszClient, ptszOldClient)) return 0; if (!PopupOptPage.GetValue(IDC_POPUPOPTDLG_SHOWVER)) { diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index 0df49d3135..913097d9d6 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -31,7 +31,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = (MCONTACT)wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && - mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) + strcmp(ws->szModule, "CList") == 0 && strcmp(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0 ? BST_CHECKED : BST_UNCHECKED); } break; diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 1f2aa2393c..260b131276 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -128,40 +128,40 @@ static int clcHookSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; if (hContact == NULL) { - if (!mir_strcmp(cws->szModule, "CListGroups")) + if (!strcmp(cws->szModule, "CListGroups")) pcli->pfnClcBroadcast(INTM_GROUPSCHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "XStatusId") || !mir_strcmp(cws->szSetting, "XStatusName")) + else if (!strcmp(cws->szSetting, "XStatusId") || !strcmp(cws->szSetting, "XStatusName")) cliCluiProtocolStatusChanged(0, cws->szModule); - else if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "OnTop")) + else if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "OnTop")) SetWindowPos(pcli->hwndContactList, cws->value.bVal ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } } else { - if (!mir_strcmp(cws->szSetting, "TickTS")) + if (!strcmp(cws->szSetting, "TickTS")) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szModule, "UserInfo")) { - if (!mir_strcmp(cws->szSetting, "Timezone")) + else if (!strcmp(cws->szModule, "UserInfo")) { + if (!strcmp(cws->szSetting, "Timezone")) pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0); } - else if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "StatusMsg")) + else if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "StatusMsg")) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); } - else if (!mir_strcmp(cws->szModule, "ContactPhoto")) { - if (!mir_strcmp(cws->szSetting, "File")) + else if (!strcmp(cws->szModule, "ContactPhoto")) { + if (!strcmp(cws->szSetting, "File")) pcli->pfnClcBroadcast(INTM_AVATARCHANGED, hContact, 0); } else { - if ((!mir_strcmp(cws->szSetting, "XStatusName") || !mir_strcmp(cws->szSetting, "XStatusMsg"))) + if ((!strcmp(cws->szSetting, "XStatusName") || !strcmp(cws->szSetting, "XStatusMsg"))) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "XStatusId")) + else if (!strcmp(cws->szSetting, "XStatusId")) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "Timezone")) + else if (!strcmp(cws->szSetting, "Timezone")) pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "ListeningTo")) + else if (!strcmp(cws->szSetting, "ListeningTo")) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "Transport") || !mir_strcmp(cws->szSetting, "IsTransported")) { + else if (!strcmp(cws->szSetting, "Transport") || !strcmp(cws->szSetting, "IsTransported")) { pcli->pfnInvalidateDisplayNameCacheEntry(hContact); pcli->pfnClcBroadcast(CLM_AUTOREBUILD, hContact, 0); } diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 28c36ab379..dc047d848e 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -397,14 +397,14 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(cws->szModule, pdnce->m_cache_cszProto)) { + if (!strcmp(cws->szModule, pdnce->m_cache_cszProto)) { InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); - if (!mir_strcmp(cws->szSetting, "IsSubcontact")) + if (!strcmp(cws->szSetting, "IsSubcontact")) pcli->pfnInitAutoRebuild(pcli->hwndContactTree); - if (!mir_strcmp(cws->szSetting, "Status") || wildcmp(cws->szSetting, "Status?")) { - if (!mir_strcmp(cws->szModule, META_PROTO) && mir_strcmp(cws->szSetting, "Status")) { + if (!strcmp(cws->szSetting, "Status") || wildcmp(cws->szSetting, "Status?")) { + if (!strcmp(cws->szModule, META_PROTO) && strcmp(cws->szSetting, "Status")) { if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled) pcli->pfnInitAutoRebuild(pcli->hwndContactTree); @@ -428,7 +428,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) pcli->pfnSortContacts(); } else { - if (!(!mir_strcmp(cws->szSetting, "LogonTS") || !mir_strcmp(cws->szSetting, "TickTS") || !mir_strcmp(cws->szSetting, "InfoTS"))) + if (!(!strcmp(cws->szSetting, "LogonTS") || !strcmp(cws->szSetting, "TickTS") || !strcmp(cws->szSetting, "InfoTS"))) pcli->pfnSortContacts(); return 0; @@ -436,18 +436,18 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) } } - if (!mir_strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szModule, "CList")) { //name is null or (setting is myhandle) - if (!mir_strcmp(cws->szSetting, "Rate")) + if (!strcmp(cws->szSetting, "Rate")) pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); - else if (pdnce->tszName == NULL || !mir_strcmp(cws->szSetting, "MyHandle")) + else if (pdnce->tszName == NULL || !strcmp(cws->szSetting, "MyHandle")) InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); - else if (!mir_strcmp(cws->szSetting, "Group")) + else if (!strcmp(cws->szSetting, "Group")) InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); - else if (!mir_strcmp(cws->szSetting, "Hidden")) { + else if (!strcmp(cws->szSetting, "Hidden")) { InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { char *szProto = GetContactProto(hContact); @@ -456,13 +456,13 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) } pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); } - else if (!mir_strcmp(cws->szSetting, "noOffline")) { + else if (!strcmp(cws->szSetting, "noOffline")) { InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); } } - else if (!mir_strcmp(cws->szModule, "Protocol")) { - if (!mir_strcmp(cws->szSetting, "p")) { + else if (!strcmp(cws->szModule, "Protocol")) { + if (!strcmp(cws->szSetting, "p")) { InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); char *szProto = (cws->value.type == DBVT_DELETED) ? NULL : cws->value.pszVal; cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto, diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 068462bc3e..7bdad76348 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -117,14 +117,14 @@ static int ehhToolBarSettingsChanged(WPARAM hContact, LPARAM lParam) if (hContact != NULL) return 0; - if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "HideOffline")) + if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "HideOffline")) SetButtonPressed(3, cws->value.bVal); - else if (!mir_strcmp(cws->szSetting, "UseGroups")) + else if (!strcmp(cws->szSetting, "UseGroups")) SetButtonPressed(6, cws->value.bVal); } - else if (!mir_strcmp(cws->szModule, "Skin")) { - if (!mir_strcmp(cws->szSetting, "UseSound")) + else if (!strcmp(cws->szModule, "Skin")) { + if (!strcmp(cws->szSetting, "UseSound")) SetButtonPressed(7, cws->value.bVal); } diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 0059673aa8..8e672b8824 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -41,7 +41,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP { MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam; - if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) + if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && strcmp(ws->szModule, "CList") == 0 && strcmp(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0 ? BST_CHECKED : BST_UNCHECKED); } break; diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 82adffe7ef..9990563094 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -165,7 +165,7 @@ static int ExtraImgSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; if (hContact) { /* user details update */ - if (!mir_strcmp(dbcws->szSetting,"RealIP") || !mir_strcmp(dbcws->szSetting,"Country") || !mir_strcmp(dbcws->szSetting,"CompanyCountry")) { + if (!strcmp(dbcws->szSetting,"RealIP") || !strcmp(dbcws->szSetting,"Country") || !strcmp(dbcws->szSetting,"CompanyCountry")) { /* Extra Image */ SetExtraImage(hContact); /* Status Icon */ diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index bfdbd49075..ed7a435c77 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -886,7 +886,7 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (cws && cws->szSetting && !mir_strcmp(cws->szSetting, "MirVer")) { + if (cws && cws->szSetting && !strcmp(cws->szSetting, "MirVer")) { switch (cws->value.type) { case DBVT_UTF8: ApplyFingerprintImage(hContact, ptrT(mir_utf8decodeT(cws->value.pszVal))); diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 4bee59b187..b95dccd0ab 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -229,7 +229,7 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam; if (hContact == NULL) { - if ((0 == _stricmp(pdbcws->szModule, "CLC")) || (0 == _stricmp(pdbcws->szModule, MODULE))) { + if ((0 == strcmp(pdbcws->szModule, "CLC")) || (0 == strcmp(pdbcws->szModule, MODULE))) { LoadDBSettings(); ApplyOptionsChanges(); } @@ -241,15 +241,15 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; // Only on these 2 events we need to refresh - if (0 == _stricmp(pdbcws->szSetting, "Status")) + if (0 == strcmp(pdbcws->szSetting, "Status")) idStatus = pdbcws->value.wVal; - else if (0 == _stricmp(pdbcws->szSetting, "ApparentMode")) + else if (0 == strcmp(pdbcws->szSetting, "ApparentMode")) idStatus = GetContactStatus(hContact); - else if (0 == _stricmp(pdbcws->szSetting, "Nick")) + else if (0 == strcmp(pdbcws->szSetting, "Nick")) idStatus = GetContactStatus(hContact); - else if (0 == _stricmp(pdbcws->szSetting, "MyHandle")) + else if (0 == strcmp(pdbcws->szSetting, "MyHandle")) idStatus = GetContactStatus(hContact); - else if (fcOpt.bShowIdle && 0 == _stricmp(pdbcws->szSetting, "IdleTS")) + else if (fcOpt.bShowIdle && 0 == strcmp(pdbcws->szSetting, "IdleTS")) idStatus = GetContactStatus(hContact); else bRefresh = FALSE; diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 89013018cc..17768316b0 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -146,11 +146,11 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Mask1")) + if (!strcmp(cws->szModule, "Ignore") && !strcmp(cws->szSetting, "Mask1")) applyExtraImage(hContact); else if (hContact == 0) { - if ((!mir_strcmp(cws->szModule, MODULENAME) && !mir_strcmp(cws->szSetting, "Filter")) || - (bUseMirandaSettings && !mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Default1"))) + if ((!strcmp(cws->szModule, MODULENAME) && !strcmp(cws->szSetting, "Filter")) || + (bUseMirandaSettings && !strcmp(cws->szModule, "Ignore") && !strcmp(cws->szSetting, "Default1"))) { fill_filter(); } diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 8f8440f726..ea276f77ff 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -869,11 +869,11 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (mir_strcmp(cws->szSetting, "ListeningTo") != 0) + if (strcmp(cws->szSetting, "ListeningTo") != 0) return 0; char *proto = GetContactProto(hContact); - if (proto == NULL || mir_strcmp(cws->szModule, proto) != 0) + if (proto == NULL || strcmp(cws->szModule, proto) != 0) return 0; if (cws->value.type == DBVT_DELETED || cws->value.ptszVal == NULL || cws->value.ptszVal[0] == 0) diff --git a/plugins/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/src/dbfilter.cpp index 354a25e00d..6c881c326f 100644 --- a/plugins/MirOTR/src/dbfilter.cpp +++ b/plugins/MirOTR/src/dbfilter.cpp @@ -222,7 +222,7 @@ int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; - if (!lParam || mir_strcmp(cws->szSetting, "Status") != 0) return 0; + if (!lParam || strcmp(cws->szSetting, "Status") != 0) return 0; int status = 0; switch (cws->value.type) { case DBVT_WORD: diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index d7c9388caa..037018765e 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1440,7 +1440,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if ((wParam == 0) || (mir_strcmp(cws->szSetting, "Status") != NULL)) + if ((wParam == 0) || (strcmp(cws->szSetting, "Status") != NULL)) return 0; @@ -1665,10 +1665,10 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam) CEvent Event; Event.hContact = hContact; - if (!mir_strcmp(dbcws->szSetting, "Nick") || !mir_strcmp(dbcws->szSetting, "MyHandle")) { + if (!strcmp(dbcws->szSetting, "Nick") || !strcmp(dbcws->szSetting, "MyHandle")) { DBVARIANT dbv = { 0 }; // if the protocol nick has changed, check if a custom handle is set - if (!mir_strcmp(dbcws->szSetting, "Nick")) { + if (!strcmp(dbcws->szSetting, "Nick")) { if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv)) { // handle found, ignore this event if (dbv.pszVal && mir_strlen(dbv.pszVal) > 0) @@ -1692,12 +1692,12 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam) db_free(&dbv); } } - else if (!mir_strcmp(dbcws->szModule, "CList")) { - if (!mir_strcmp(dbcws->szSetting, "Hidden")) { + else if (!strcmp(dbcws->szModule, "CList")) { + if (!strcmp(dbcws->szSetting, "Hidden")) { Event.eType = EVENT_CONTACT_HIDDEN; Event.iValue = db_get_b(hContact, "CList", "Hidden", 0); } - else if (!mir_strcmp(dbcws->szSetting, "Group")) { + else if (!strcmp(dbcws->szSetting, "Group")) { Event.eType = EVENT_CONTACT_GROUP; DBVARIANT dbv; int res = db_get_ts(hContact, "CList", "Group", &dbv); diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index 53c7f0e2af..f02c4b1da8 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -88,7 +88,7 @@ int onContactSettingChanged(WPARAM wParam, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(cws->szModule, proto) && !mir_strcmp(cws->szSetting, "MirVer")) + if (!strcmp(cws->szModule, proto) && !strcmp(cws->szSetting, "MirVer")) ExtraIconsApply(wParam, 1); return 0; diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index b7ae628f03..2dacea2550 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -2386,13 +2386,13 @@ int SettingsChangedHook(WPARAM wParam, LPARAM lParam) if ((HANDLE)wParam == NULL) { Protocol *proto = protocols->Get(cws->szModule); - if (!mir_strcmp(cws->szSetting, "MyHandle") - || !mir_strcmp(cws->szSetting, "UIN") - || !mir_strcmp(cws->szSetting, "Nick") - || !mir_strcmp(cws->szSetting, "FirstName") - || !mir_strcmp(cws->szSetting, "e-mail") - || !mir_strcmp(cws->szSetting, "LastName") - || !mir_strcmp(cws->szSetting, "JID")) { + if (!strcmp(cws->szSetting, "MyHandle") + || !strcmp(cws->szSetting, "UIN") + || !strcmp(cws->szSetting, "Nick") + || !strcmp(cws->szSetting, "FirstName") + || !strcmp(cws->szSetting, "e-mail") + || !strcmp(cws->szSetting, "LastName") + || !strcmp(cws->szSetting, "JID")) { // Name changed if (proto != NULL) PostMessage(hwnd_frame, MWM_NICK_CHANGED, (WPARAM)proto->name, 0); @@ -2400,7 +2400,7 @@ int SettingsChangedHook(WPARAM wParam, LPARAM lParam) else if (strstr(cws->szModule, "Away")) // Status message changed PostMessage(hwnd_frame, MWM_STATUS_MSG_CHANGED, 0, 0); - else if (proto != NULL && mir_strcmp(cws->szSetting, "ListeningTo") == 0) + else if (proto != NULL && strcmp(cws->szSetting, "ListeningTo") == 0) PostMessage(hwnd_frame, MWM_LISTENINGTO_CHANGED, (WPARAM)proto->name, 0); } diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 2652a89873..fbd876b1e5 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -367,7 +367,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) static int DBSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (hContact != NULL && !mir_strcmp(cws->szSetting, "Status")) + if (hContact != NULL && !strcmp(cws->szSetting, "Status")) db_set_w(hContact, "UserOnline", "OldStatus", cws->value.wVal); return 0; diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 08aab903b9..24404222a9 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -785,11 +785,11 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (ProcessExtraStatus(cws, hContact)) return 0; - if (!mir_strcmp(cws->szSetting, "Status")) + if (!strcmp(cws->szSetting, "Status")) if (ProcessStatus(cws, hContact)) return 0; - if (!mir_strcmp(cws->szModule, "CList") && !mir_strcmp(cws->szSetting, "StatusMsg")) + if (!strcmp(cws->szModule, "CList") && !strcmp(cws->szSetting, "StatusMsg")) if (ProcessStatusMessage(cws, hContact)) return 0; diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index 9b8cb8a990..a461029377 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -110,7 +110,7 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (hContact != NULL && !mir_strcmp(cws->szModule, "CList") && !mir_strcmp(cws->szSetting, "Rate")) + if (hContact != NULL && !strcmp(cws->szModule, "CList") && !strcmp(cws->szSetting, "Rate")) setExtraIcon(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal); return 0; diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index c20f4122ba..b15c991127 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -441,7 +441,7 @@ static int OnContactSettingChanged( WPARAM hContact, LPARAM lParam ) { DBCONTACTWRITESETTING* pdbcws = ( DBCONTACTWRITESETTING* )lParam; if ( hContact == NULL ) - if ( !mir_strcmpi( pdbcws->szModule, dbLastUC_ModuleName)) + if ( !strcmp( pdbcws->szModule, dbLastUC_ModuleName)) LoadDBSettings(); return 0; diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 6a384d36d2..fb24a45acb 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -238,7 +238,7 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; char *szProto = GetContactProto(hContact); - if (!mir_strcmp(cws->szModule, "CList") || !mir_strcmp(cws->szModule, szProto)) + if (!strcmp(cws->szModule, "CList") || !strcmp(cws->szModule, szProto)) WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, hContact, lParam); return 0; } diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 324fd5b7df..c78bc618df 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (!hContact || mir_strcmp(cws->szSetting, "Status")) return 0; + if (!hContact || strcmp(cws->szSetting, "Status")) return 0; pUinKey ptr = getUinKey(hContact); int stat = getContactStatus(hContact); diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index a1f5e80995..72cc928f17 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -560,7 +560,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lparam; char *szProto = GetContactProto(hContact); - if (cws->value.type == DBVT_DWORD && !mir_strcmp(cws->szSetting, "LastSeen") && !mir_strcmp(cws->szModule, szProto)) { + if (cws->value.type == DBVT_DWORD && !strcmp(cws->szSetting, "LastSeen") && !mir_strcmp(cws->szModule, szProto)) { DBWriteTimeTS(cws->value.dVal, hContact); HWND hwnd = WindowList_Find(g_pUserInfo, hContact); @@ -569,11 +569,11 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) return 0; } - BOOL isIdleEvent = includeIdle ? (mir_strcmp(cws->szSetting, "IdleTS") == 0) : 0; - if (mir_strcmp(cws->szSetting, "Status") && mir_strcmp(cws->szSetting, "StatusTriger") && (isIdleEvent == 0)) + BOOL isIdleEvent = includeIdle ? (strcmp(cws->szSetting, "IdleTS") == 0) : 0; + if (strcmp(cws->szSetting, "Status") && strcmp(cws->szSetting, "StatusTriger") && (isIdleEvent == 0)) return 0; - if (!mir_strcmp(cws->szModule, S_MOD)) { + if (!strcmp(cws->szModule, S_MOD)) { // here we will come when Settings/SeenModule/StatusTriger is changed WORD prevStatus = db_get_w(hContact, S_MOD, "OldStatus", ID_STATUS_OFFLINE); if (includeIdle) { diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index a89c92ca7c..9c9885d244 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -437,7 +437,7 @@ int DbSettingChanged(WPARAM hContact, LPARAM lParam) if (cws->value.type == DBVT_DELETED) return 0; - if (mir_strcmp(cws->szSetting, "Transport") == 0) { + if (strcmp(cws->szSetting, "Transport") == 0) { CMString catname(_T("Standard")); SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname); if (smc != NULL) diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index e70a584b09..c1aa915c5c 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -303,9 +303,9 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l) DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l; // if CList/NotOnList is being deleted then remove answeredSetting - if (mir_strcmp(cws->szModule, "CList")) + if (strcmp(cws->szModule, "CList")) return 0; - if (mir_strcmp(cws->szSetting, "NotOnList")) + if (strcmp(cws->szSetting, "NotOnList")) return 0; if (!cws->value.type) { db_unset(hContact, pluginName, "Answered"); diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index b0c9802ac5..045c189e44 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -191,9 +191,9 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, hContact, l) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)l; // if CList/NotOnList is being deleted then remove answeredSetting - if (mir_strcmp(cws->szModule, "CList")) + if (strcmp(cws->szModule, "CList")) return 0; - if (mir_strcmp(cws->szSetting, "NotOnList")) + if (strcmp(cws->szSetting, "NotOnList")) return 0; if (!cws->value.type) { diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index c114153edf..c14e12d01c 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -365,20 +365,20 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) HWND hwnd = M.FindWindow(hContact); if (hwnd == 0 && hContact != 0) { // we are not interested in this event if there is no open message window/tab - if (!mir_strcmp(setting, "Status") || !mir_strcmp(setting, "MyHandle") || !mir_strcmp(setting, "Nick") || !mir_strcmp(cws->szModule, SRMSGMOD_T)) { + if (!strcmp(setting, "Status") || !strcmp(setting, "MyHandle") || !strcmp(setting, "Nick") || !strcmp(cws->szModule, SRMSGMOD_T)) { c = CContactCache::getContactCache(hContact); if (c) { fChanged = c->updateStatus(); - if (mir_strcmp(setting, "Status")) + if (strcmp(setting, "Status")) c->updateNick(); - if (!mir_strcmp(setting, "isFavorite") || !mir_strcmp(setting, "isRecent")) + if (!strcmp(setting, "isFavorite") || !strcmp(setting, "isRecent")) c->updateFavorite(); } } return 0; } - if (hContact == 0 && !mir_strcmp("Nick", setting)) { + if (hContact == 0 && !strcmp("Nick", setting)) { M.BroadcastMessage(DM_OWNNICKCHANGED, 0, (LPARAM)cws->szModule); return 0; } @@ -387,18 +387,18 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) c = CContactCache::getContactCache(hContact); if (c) { szProto = c->getProto(); - if (!mir_strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings - if (!mir_strcmp(setting, "isFavorite") || !mir_strcmp(setting, "isRecent")) + if (!strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings + if (!strcmp(setting, "isFavorite") || !strcmp(setting, "isRecent")) c->updateFavorite(); } } } - if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto))) + if (strcmp(cws->szModule, "CList") && (szProto == NULL || strcmp(cws->szModule, szProto))) return 0; - if (!mir_strcmp(cws->szModule, META_PROTO)) - if (hContact != 0 && !mir_strcmp(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact + if (!strcmp(cws->szModule, META_PROTO)) + if (hContact != 0 && !strcmp(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact return 0; if (hwnd) { @@ -406,21 +406,21 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) fChanged = c->updateStatus(); fNickChanged = c->updateNick(); } - if (mir_strlen(setting) > 6 && mir_strlen(setting) < 9 && !strncmp(setting, "Status", 6)) { + if (strlen(setting) > 6 && strlen(setting) < 9 && !strncmp(setting, "Status", 6)) { fChanged = true; if (c) { c->updateMeta(); c->updateUIN(); } } - else if (!mir_strcmp(setting, "MirVer")) + else if (!strcmp(setting, "MirVer")) PostMessage(hwnd, DM_CLIENTCHANGED, 0, 0); - else if (!mir_strcmp(setting, "display_uid")) { + else if (!strcmp(setting, "display_uid")) { if (c) c->updateUIN(); PostMessage(hwnd, DM_UPDATEUIN, 0, 0); } - else if (mir_strlen(setting) > 6 && strstr("StatusMsg,XStatusMsg,XStatusName,XStatusId,ListeningTo", setting)) { + else if (strlen(setting) > 6 && strstr("StatusMsg,XStatusMsg,XStatusName,XStatusId,ListeningTo", setting)) { if (c) { c->updateStatusMsg(setting); fExtendedStatusChange = true; diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 67218d0e40..960f1a3646 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -94,7 +94,7 @@ int ReloadFont(WPARAM, LPARAM) int SettingChanged(WPARAM, LPARAM lParam) { DBCONTACTWRITESETTING *dcws = (DBCONTACTWRITESETTING *)lParam; - if (mir_strcmp(dcws->szModule, "CList") != 0 || mir_strcmp(dcws->szSetting, "State") != 0) + if (strcmp(dcws->szModule, "CList") != 0 || strcmp(dcws->szSetting, "State") != 0) return 0; // clist hiding diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 80dbb319f8..cf5aa7d4dc 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -204,9 +204,9 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; bool idle = false; - if (mir_strcmp(cws->szSetting, "Status") == 0) + if (strcmp(cws->szSetting, "Status") == 0) idle = false; - else if (mir_strcmp(cws->szSetting, "IdleTS") == 0) + else if (strcmp(cws->szSetting, "IdleTS") == 0) idle = true; else return 0; diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 949a0f032e..8bf37c6d23 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -43,18 +43,18 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam) if (hContact != 0 || dbcws == NULL) return 0; - if (!mir_strcmp(dbcws->szModule, "CList")) { - if (!mir_strcmp(dbcws->szSetting, "HideOffline")) + if (!strcmp(dbcws->szModule, "CList")) { + if (!strcmp(dbcws->szSetting, "HideOffline")) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton, dbcws->value.bVal ? 0 : TTBST_PUSHED); - else if (!mir_strcmp(dbcws->szSetting, "UseGroups")) + else if (!strcmp(dbcws->szSetting, "UseGroups")) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0); } - else if (!mir_strcmp(dbcws->szModule, "Skin")) { - if (!mir_strcmp(dbcws->szSetting, "UseSound")) + else if (!strcmp(dbcws->szModule, "Skin")) { + if (!strcmp(dbcws->szSetting, "UseSound")) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0); } - else if (!mir_strcmp(dbcws->szModule, "MetaContacts")) { - if (!mir_strcmp(dbcws->szSetting, "Enabled")) + else if (!strcmp(dbcws->szModule, "MetaContacts")) { + if (!strcmp(dbcws->szSetting, "Enabled")) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0); } diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index caa4bc5a95..04f2f0154b 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -170,9 +170,9 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) /* user details update */ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(dbcws->szSetting, SET_CONTACT_COUNTRY) || - !mir_strcmp(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) || - !mir_strcmp(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY)) + if (!strcmp(dbcws->szSetting, SET_CONTACT_COUNTRY) || + !strcmp(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) || + !strcmp(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY)) { /* Extra Image */ SetExtraImage(hContact); diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 1354e4cc50..ad2bb1ada9 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1327,13 +1327,13 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar break; } - if ( !mir_strcmp(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !mir_strcmp(pdbcws->szSetting, SET_CONTACT_NICK)) { + if ( !strcmp(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !strcmp(pdbcws->szSetting, SET_CONTACT_NICK)) { // force the update of all propertysheetpages DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL); // update the windowtitle DlgProc(hDlg, HM_SETWINDOWTITLE, NULL, lParam); } - else if ( !mir_strcmp(pdbcws->szModule, USERINFO) || !mir_strcmp(pdbcws->szModule, pPs->pszProto) || !mir_strcmp(pdbcws->szModule, MOD_MBIRTHDAY)) { + else if ( !strcmp(pdbcws->szModule, USERINFO) || !strcmp(pdbcws->szModule, pPs->pszProto) || !strcmp(pdbcws->szModule, MOD_MBIRTHDAY)) { // force the update of all propertysheetpages DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL); } diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 4d8a11bd47..f571c33dcc 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -700,7 +700,7 @@ static int OnSettingChanged(WPARAM hContact, LPARAM lParam) { if (hContact == NULL) { DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam; - if (!mir_strcmp(pdbcws->szModule, "Contact") && !mir_strcmp(pdbcws->szSetting, "NameOrder")) + if (!strcmp(pdbcws->szModule, "Contact") && !strcmp(pdbcws->szSetting, "NameOrder")) memcpy(gNameOrder, pdbcws->value.pbVal, pdbcws->value.cpbVal); } return 0; diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 799b11cb8c..c642ace2f3 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -143,9 +143,9 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb { if (hContact && pdbcws && pdbcws->szSetting && ((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) && - (!mir_strncmp(pdbcws->szSetting, SET_CONTACT_EMAIL, 6) || - !mir_strncmp(pdbcws->szSetting, SET_CONTACT_COMPANY_EMAIL, 13) || - !mir_strncmp(pdbcws->szSetting, "mye-mail0", 9))) + (!strncmp(pdbcws->szSetting, SET_CONTACT_EMAIL, 6) || + !strncmp(pdbcws->szSetting, SET_CONTACT_COMPANY_EMAIL, 13) || + !strncmp(pdbcws->szSetting, "mye-mail0", 9))) { OnCListApplyIcons(hContact, 0); } diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 50c400fa0c..637590abd3 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -92,7 +92,7 @@ static int OnCListApplyIcons(MCONTACT hContact, LPARAM) static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws) { - if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !mir_strcmp(pdbcws->szSetting, SET_CONTACT_GENDER)) + if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !strcmp(pdbcws->szSetting, SET_CONTACT_GENDER)) OnCListApplyIcons(hContact, 0); return 0; diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp index 587ddc483d..a45f8b36e3 100644 --- a/plugins/UserInfoEx/src/svc_phone.cpp +++ b/plugins/UserInfoEx/src/svc_phone.cpp @@ -109,10 +109,10 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb { if (hContact && pdbcws && pdbcws->szSetting && ((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) && - (!mir_strcmp(pdbcws->szSetting, SET_CONTACT_PHONE) || - !mir_strcmp(pdbcws->szSetting, SET_CONTACT_CELLULAR) || - !mir_strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_PHONE) || - !mir_strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_CELLULAR) || + (!strcmp(pdbcws->szSetting, SET_CONTACT_PHONE) || + !strcmp(pdbcws->szSetting, SET_CONTACT_CELLULAR) || + !strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_PHONE) || + !strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_CELLULAR) || !strncmp(pdbcws->szSetting, "MyPhone0", 8))) OnCListApplyIcons(hContact, 0); diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 3ab77baea8..a61b0524d0 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -369,13 +369,13 @@ static int contactSettingChanged(WPARAM hContact, LPARAM lParam) continue; char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); - if (((!mir_strcmp(dbw->szSetting, "Nick")) && (cce[i].flags & CI_NICK)) || - ((!mir_strcmp(dbw->szSetting, "FirstName")) && (cce[i].flags & CI_FIRSTNAME)) || - ((!mir_strcmp(dbw->szSetting, "LastName")) && (cce[i].flags & CI_LASTNAME)) || - ((!mir_strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags & CI_EMAIL)) || - ((!mir_strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags & CI_LISTNAME)) || + if (((!strcmp(dbw->szSetting, "Nick")) && (cce[i].flags & CI_NICK)) || + ((!strcmp(dbw->szSetting, "FirstName")) && (cce[i].flags & CI_FIRSTNAME)) || + ((!strcmp(dbw->szSetting, "LastName")) && (cce[i].flags & CI_LASTNAME)) || + ((!strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags & CI_EMAIL)) || + ((!strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags & CI_LISTNAME)) || (cce[i].flags & CI_CNFINFO) != 0 || // lazy; always invalidate CNF info cache entries - ((((INT_PTR)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!mir_strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID))) { + ((((INT_PTR)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID))) { /* remove from cache */ mir_free(cce[i].tszContact); if (cacheSize > 1) { diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 6fd09544a1..088f65c69d 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -37,15 +37,15 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - if (!mir_strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szModule, "CList")) { int invalidpresent = 0; char *szProto = GetContactProto(hContact); - if (szProto == NULL || mir_strcmp(szProto, MODULENAME)) + if (szProto == NULL || strcmp(szProto, MODULENAME)) return 0; // A contact is renamed - if (!mir_strcmp(cws->szSetting, "MyHandle")) { + if (!strcmp(cws->szSetting, "MyHandle")) { ptrT oldName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); if (oldName == NULL) return 0; diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index c00b8c629e..63f54e866f 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -58,7 +58,7 @@ static int OnOptionsInitialise(WPARAM wParam, LPARAM) static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *dw = (DBCONTACTWRITESETTING *)lParam; - if ((mir_strcmp(dw->szModule, DUMMY_MODULE) == 0) && (mir_strcmp(dw->szSetting, DUMMY_SETTING) == 0)) + if ((strcmp(dw->szModule, DUMMY_MODULE) == 0) && (strcmp(dw->szSetting, DUMMY_SETTING) == 0)) RefreshContactListIcons(hContact); return 0; diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp index 08e4cfa015..20fb46f141 100644 --- a/plugins/ZeroNotification/src/main.cpp +++ b/plugins/ZeroNotification/src/main.cpp @@ -103,7 +103,7 @@ static void UpdateMenuItem() static int SoundSettingChanged(WPARAM, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (mir_strcmp(cws->szModule, "Skin") || mir_strcmp(cws->szSetting, "UseSound")) + if (strcmp(cws->szModule, "Skin") || strcmp(cws->szSetting, "UseSound")) return 0; UpdateMenuItem(); diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 5d09e1bc6b..58f4d4153e 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -75,9 +75,9 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) MCONTACT hContact = (MCONTACT) wParam; DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - logmsg("ContactSettingChanged1"); + if(hContact==NULL || strcmp(cws->szSetting,"Status")) return 0; - if(hContact==NULL || mir_strcmp(cws->szSetting,"Status")) return 0; + logmsg("ContactSettingChanged1"); WORD newStatus = cws->value.wVal; WORD oldStatus = DBGetContactSettingRangedWord(hContact,"UserOnline","OldStatus2",ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX); diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4b74f823a0..4b99db4956 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -196,9 +196,9 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) // это наш контакт, он не временный (есть в списке на сервере) и его обновление разрешено if (IsContactMra(hContact) && !db_get_b(hContact, "CList", "NotOnList", 0) && getDword(hContact, "HooksLocked", FALSE) == FALSE) { - if (!mir_strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szModule, "CList")) { // MyHandle setting - if (!mir_strcmp(cws->szSetting, "MyHandle")) { + if (!strcmp(cws->szSetting, "MyHandle")) { // always store custom nick CMStringW wszNick; if (cws->value.type == DBVT_DELETED) { @@ -222,7 +222,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) } } // Group setting - else if (!mir_strcmp(cws->szSetting, "Group")) { + else if (!strcmp(cws->szSetting, "Group")) { CMStringW wszGroup; // manage group on server switch (cws->value.type) { @@ -243,7 +243,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) } } // NotOnList setting. Has a temporary contact just been added permanently? - else if (!mir_strcmp(cws->szSetting, "NotOnList")) { + else if (!strcmp(cws->szSetting, "NotOnList")) { if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) { CMStringW wszAuthMessage; if (!mraGetStringW(NULL, "AuthMessage", wszAuthMessage)) @@ -259,7 +259,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) } } // Hidden setting - else if (!mir_strcmp(cws->szSetting, "Hidden")) { + else if (!strcmp(cws->szSetting, "Hidden")) { DWORD dwContactFlag = GetContactFlags(hContact); if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) dwContactFlag &= ~CONTACT_FLAG_SHADOW; @@ -270,8 +270,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) } } // Ignore section - else if (!mir_strcmp(cws->szModule, "Ignore")) { - if (!mir_strcmp(cws->szSetting, "Mask1")) { + else if (!strcmp(cws->szModule, "Ignore")) { + if (!strcmp(cws->szSetting, "Mask1")) { DWORD dwContactFlag = GetContactFlags(hContact); if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_DWORD && cws->value.dVal&IGNOREEVENT_MESSAGE) == 0) dwContactFlag &= ~CONTACT_FLAG_IGNORE; @@ -282,8 +282,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) } } // User info section - else if (!mir_strcmp(cws->szModule, "UserInfo")) { - if (!mir_strcmp(cws->szSetting, "MyPhone0") || !mir_strcmp(cws->szSetting, "MyPhone1") || !mir_strcmp(cws->szSetting, "MyPhone2")) + else if (!strcmp(cws->szModule, "UserInfo")) { + if (!strcmp(cws->szSetting, "MyPhone0") || !strcmp(cws->szSetting, "MyPhone1") || !strcmp(cws->szSetting, "MyPhone2")) MraModifyContact(hContact); } } diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 4e4f992347..5c8fa5d869 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -867,15 +867,15 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) if (hContact == NULL) return 0; if (!isConnected) return 0; - if (!mir_strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szModule, "CList")) { DBVARIANT dbv; TLEN_LIST_ITEM *item; char *nick, *jid, *group; char *szProto = GetContactProto(hContact); - if (szProto == NULL || mir_strcmp(szProto, m_szModuleName)) return 0; + if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0; // A contact's group is changed - if (!mir_strcmp(cws->szSetting, "Group")) { + if (!strcmp(cws->szSetting, "Group")) { if (!db_get(hContact, m_szModuleName, "jid", &dbv)) { if ((item = TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) { db_free(&dbv); @@ -897,7 +897,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) } else if (cws->value.pszVal != NULL) { char *newGroup = settingToChar(cws); - if (item->group == NULL || mir_strcmp(newGroup, item->group)) { + if (item->group == NULL || strcmp(newGroup, item->group)) { debugLogA("Group set to %s", newGroup); if ((group = TlenGroupEncode(newGroup)) != NULL) { TlenSend(this, "%s", nick, item->jid, group); @@ -915,12 +915,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) } } // A contact is renamed - else if (!mir_strcmp(cws->szSetting, "MyHandle")) { + else if (!strcmp(cws->szSetting, "MyHandle")) { char *newNick; // hContact = (MCONTACT) wParam; // szProto = GetContactProto(hContact); - // if (szProto == NULL || mir_strcmp(szProto, proto->m_szModuleName)) return 0; + // if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0; if (!db_get(hContact, m_szModuleName, "jid", &dbv)) { jid = dbv.pszVal; @@ -935,7 +935,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) newNick = NULL; } // Note: we need to compare with item->nick to prevent infinite loop - if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && mir_strcmp(item->nick, newNick)))) { + if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && strcmp(item->nick, newNick)))) { if ((nick = TlenTextEncode(newNick)) != NULL) { debugLogA("Nick set to %s", newNick); if (item->group != NULL && (group = TlenGroupEncode(item->group)) != NULL) { @@ -954,7 +954,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) } } // A temporary contact has been added permanently - else if (!mir_strcmp(cws->szSetting, "NotOnList")) { + else if (!strcmp(cws->szSetting, "NotOnList")) { if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) { ptrA szJid(db_get_sa(hContact, m_szModuleName, "jid")); if (szJid != NULL) { diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 8748604ff9..3027e38563 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -32,7 +32,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && - mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { + strcmp(ws->szModule, "CList") == 0 && strcmp(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0 ? BST_CHECKED : BST_UNCHECKED); } } diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 66655cc34f..5840092717 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -199,14 +199,14 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam) if (cws->szModule == NULL) return 0; - if (!mir_strcmp(cws->szModule, "CList")) + if (!strcmp(cws->szModule, "CList")) WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0); else if (hContact) { - if (cws->szSetting && !mir_strcmp(cws->szSetting, "Timezone")) + if (cws->szSetting && !strcmp(cws->szSetting, "Timezone")) WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM)cws, 0); else { char *szProto = GetContactProto(hContact); - if (szProto && !mir_strcmp(cws->szModule, szProto)) + if (szProto && !strcmp(cws->szModule, szProto)) WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0); } } diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index dc6a5e682b..fe30974a67 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -34,7 +34,7 @@ static bool Proto_IsAccountEnabled(PROTOACCOUNT *pa) static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (hContact == NULL || mir_strcmp(cws->szSetting, "Status")) + if (hContact == NULL || strcmp(cws->szSetting, "Status")) return 0; int newStatus = cws->value.wVal; diff --git a/src/mir_app/src/DefaultExtraIcons.cpp b/src/mir_app/src/DefaultExtraIcons.cpp index ece76bf24c..43024c0552 100644 --- a/src/mir_app/src/DefaultExtraIcons.cpp +++ b/src/mir_app/src/DefaultExtraIcons.cpp @@ -169,13 +169,13 @@ static int SettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - bool isProto = (mir_strcmp(cws->szModule, proto) == 0); - if (isProto && mir_strcmp(cws->szSetting, "ApparentMode") == 0) { + bool isProto = (strcmp(cws->szModule, proto) == 0); + if (isProto && strcmp(cws->szSetting, "ApparentMode") == 0) { SetVisibility(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.wVal, true); return 0; } - if (mir_strcmp(cws->szSetting, "Gender") == 0 && (isProto || mir_strcmp(cws->szModule, "UserInfo") == 0)) { + if (strcmp(cws->szSetting, "Gender") == 0 && (isProto || strcmp(cws->szModule, "UserInfo") == 0)) { SetGender(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal, true); return 0; } @@ -188,9 +188,9 @@ static int SettingChanged(WPARAM hContact, LPARAM lParam) break; if (p.db[j] == NULL && !isProto) continue; - if (p.db[j] != NULL && mir_strcmp(cws->szModule, p.db[j])) + if (p.db[j] != NULL && strcmp(cws->szModule, p.db[j])) continue; - if (mir_strcmp(cws->szSetting, p.db[j + 1])) + if (strcmp(cws->szSetting, p.db[j + 1])) continue; bool show = (cws->value.type != DBVT_DELETED && !IsEmpty(cws->value.pszVal)); diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index cdd39e3e8c..ca55ff61ed 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -66,49 +66,49 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; if (hContact == NULL) { - if (!mir_strcmp(cws->szModule, "CListGroups")) + if (!strcmp(cws->szModule, "CListGroups")) cli.pfnClcBroadcast(INTM_GROUPSCHANGED, hContact, lParam); return 0; } - if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "MyHandle")) { + if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "MyHandle")) { cli.pfnInvalidateDisplayNameCacheEntry(hContact); cli.pfnClcBroadcast(INTM_NAMECHANGED, hContact, lParam); } - else if (!mir_strcmp(cws->szSetting, "Group")) + else if (!strcmp(cws->szSetting, "Group")) cli.pfnClcBroadcast(INTM_GROUPCHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "Hidden")) + else if (!strcmp(cws->szSetting, "Hidden")) cli.pfnClcBroadcast(INTM_HIDDENCHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "NotOnList")) + else if (!strcmp(cws->szSetting, "NotOnList")) cli.pfnClcBroadcast(INTM_NOTONLISTCHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "Status")) + else if (!strcmp(cws->szSetting, "Status")) cli.pfnClcBroadcast(INTM_INVALIDATE, 0, 0); - else if (!mir_strcmp(cws->szSetting, "NameOrder")) + else if (!strcmp(cws->szSetting, "NameOrder")) cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0); } else { char *szProto = GetContactProto(hContact); if (szProto != NULL) { - if (!mir_strcmp(cws->szModule, "Protocol") && !mir_strcmp(cws->szSetting, "p")) + if (!strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p")) cli.pfnClcBroadcast(INTM_PROTOCHANGED, hContact, lParam); // something is being written to a protocol module - if (!mir_strcmp(szProto, cws->szModule)) { + if (!strcmp(szProto, cws->szModule)) { // was a unique setting key written? char *id = (char *) CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); - if ((INT_PTR)id != CALLSERVICE_NOTFOUND && id != NULL && !mir_strcmp(id, cws->szSetting)) + if ((INT_PTR)id != CALLSERVICE_NOTFOUND && id != NULL && !strcmp(id, cws->szSetting)) cli.pfnClcBroadcast(INTM_PROTOCHANGED, hContact, lParam); } } - if (szProto == NULL || mir_strcmp(szProto, cws->szModule)) + if (szProto == NULL || strcmp(szProto, cws->szModule)) return 0; - if (!mir_strcmp(cws->szSetting, "Nick") || !mir_strcmp(cws->szSetting, "FirstName") || !mir_strcmp(cws->szSetting, "e-mail") - || !mir_strcmp(cws->szSetting, "LastName") || !mir_strcmp(cws->szSetting, "UIN")) + if (!strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName") || !strcmp(cws->szSetting, "e-mail") + || !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "UIN")) cli.pfnClcBroadcast(INTM_NAMECHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "ApparentMode")) + else if (!strcmp(cws->szSetting, "ApparentMode")) cli.pfnClcBroadcast(INTM_APPARENTMODECHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "IdleTS")) + else if (!strcmp(cws->szSetting, "IdleTS")) cli.pfnClcBroadcast(INTM_IDLECHANGED, hContact, lParam); } return 0; diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp index c57e0642e6..af2a581041 100644 --- a/src/mir_app/src/clistevents.cpp +++ b/src/mir_app/src/clistevents.cpp @@ -365,10 +365,10 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM) static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (hContact == NULL && cws && cws->szModule && cws->szSetting && mir_strcmp(cws->szModule, "CList") == 0) { - if (mir_strcmp(cws->szSetting, "DisableTrayFlash") == 0) + if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) { + if (strcmp(cws->szSetting, "DisableTrayFlash") == 0) disableTrayFlash = (int)cws->value.bVal; - else if (mir_strcmp(cws->szSetting, "NoIconBlink") == 0) + else if (strcmp(cws->szSetting, "NoIconBlink") == 0) disableIconFlash = (int)cws->value.bVal; } return 0; diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index 050c67a9a3..2c0780aaa7 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -172,12 +172,12 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (!db_get(hContact, "Protocol", "p", &dbv)) { if (!mir_strcmp(cws->szModule, dbv.pszVal)) { cli.pfnInvalidateDisplayNameCacheEntry(hContact); - if (!mir_strcmp(cws->szSetting, "UIN") || !mir_strcmp(cws->szSetting, "Nick") || !mir_strcmp(cws->szSetting, "FirstName") - || !mir_strcmp(cws->szSetting, "LastName") || !mir_strcmp(cws->szSetting, "e-mail")) + if (!strcmp(cws->szSetting, "UIN") || !strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName") + || !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "e-mail")) { CallService(MS_CLUI_CONTACTRENAMED, hContact, 0); } - else if (!mir_strcmp(cws->szSetting, "Status")) { + else if (!strcmp(cws->szSetting, "Status")) { if (!db_get_b(hContact, "CList", "Hidden", 0)) { if (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) { // User's state is changing, and we are hideOffline-ing @@ -200,8 +200,8 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) } } - if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "Hidden")) { + if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "Hidden")) { if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { char *szProto = GetContactProto(hContact); cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1); @@ -209,12 +209,12 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) else CallService(MS_CLUI_CONTACTDELETED, hContact, 0); } - if (!mir_strcmp(cws->szSetting, "MyHandle")) + if (!strcmp(cws->szSetting, "MyHandle")) cli.pfnInvalidateDisplayNameCacheEntry(hContact); } - if (!mir_strcmp(cws->szModule, "Protocol")) { - if (!mir_strcmp(cws->szSetting, "p")) { + if (!strcmp(cws->szModule, "Protocol")) { + if (!strcmp(cws->szSetting, "p")) { char *szProto; if (cws->value.type == DBVT_DELETED) szProto = NULL; diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index d66a1334ca..2965ca635f 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -344,19 +344,19 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) if (contact_number == -1) return 0; // exit - db corruption - if (!mir_strcmp(dcws->szSetting, "IP")) { + if (!strcmp(dcws->szSetting, "IP")) { if (dcws->value.type == DBVT_DWORD) db_set_dw(ccMeta->contactID, META_PROTO, "IP", dcws->value.dVal); else db_unset(ccMeta->contactID, META_PROTO, "IP"); } - else if (!mir_strcmp(dcws->szSetting, "RealIP")) { + else if (!strcmp(dcws->szSetting, "RealIP")) { if (dcws->value.type == DBVT_DWORD) db_set_dw(ccMeta->contactID, META_PROTO, "RealIP", dcws->value.dVal); else db_unset(ccMeta->contactID, META_PROTO, "RealIP"); } - else if (!mir_strcmp(dcws->szSetting, "ListeningTo")) { + else if (!strcmp(dcws->szSetting, "ListeningTo")) { switch (dcws->value.type) { case DBVT_ASCIIZ: db_set_s(ccMeta->contactID, META_PROTO, "ListeningTo", dcws->value.pszVal); @@ -372,7 +372,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) break; } } - else if (!mir_strcmp(dcws->szSetting, "Nick") && dcws->value.type != DBVT_DELETED) { + else if (!strcmp(dcws->szSetting, "Nick") && dcws->value.type != DBVT_DELETED) { // subcontact nick has changed - update metacontact mir_snprintf(buffer, "Nick%d", contact_number); db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value); @@ -387,19 +387,19 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) MCONTACT hMostOnline = Meta_GetMostOnline(ccMeta); Meta_CopyContactNick(ccMeta, hMostOnline); } - else if (!mir_strcmp(dcws->szSetting, "IdleTS")) { + else if (!strcmp(dcws->szSetting, "IdleTS")) { if (dcws->value.type == DBVT_DWORD) db_set_dw(ccMeta->contactID, META_PROTO, "IdleTS", dcws->value.dVal); else if (dcws->value.type == DBVT_DELETED) db_set_dw(ccMeta->contactID, META_PROTO, "IdleTS", 0); } - else if (!mir_strcmp(dcws->szSetting, "LogonTS")) { + else if (!strcmp(dcws->szSetting, "LogonTS")) { if (dcws->value.type == DBVT_DWORD) db_set_dw(ccMeta->contactID, META_PROTO, "LogonTS", dcws->value.dVal); else if (dcws->value.type == DBVT_DELETED) db_set_dw(ccMeta->contactID, META_PROTO, "LogonTS", 0); } - else if (!mir_strcmp(dcws->szModule, "CList") && !mir_strcmp(dcws->szSetting, "MyHandle")) { + else if (!strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "MyHandle")) { if (dcws->value.type == DBVT_DELETED) { char *proto = GetContactProto(hContact); mir_snprintf(buffer, "CListName%d", contact_number); @@ -421,7 +421,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) Meta_CopyContactNick(ccMeta, Meta_GetMostOnline(ccMeta)); } // subcontact changing status - else if (!mir_strcmp(dcws->szSetting, "Status") && dcws->value.type != DBVT_DELETED) { + else if (!strcmp(dcws->szSetting, "Status") && dcws->value.type != DBVT_DELETED) { // update subcontact status setting mir_snprintf(buffer, "Status%d", contact_number); db_set_w(ccMeta->contactID, META_PROTO, buffer, dcws->value.wVal); -- cgit v1.2.3