From 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 4 Dec 2019 16:08:03 +0300 Subject: GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName --- plugins/AutoShutdown/src/watcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/AutoShutdown/src') diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 0235ac9be0..e30ab9ad5f 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -177,7 +177,7 @@ static BOOL CheckAllContactsOffline(void) BOOL fSmartCheck, fAllOffline = TRUE; /* tentatively */ fSmartCheck = g_plugin.getByte("SmartOfflineCheck", SETTING_SMARTOFFLINECHECK_DEFAULT); for (auto &hContact : Contacts()) { - char *pszProto = GetContactProto(hContact); + char *pszProto = Proto_GetBaseAccountName(hContact); if (pszProto != nullptr && Proto_GetStatus(pszProto) != ID_STATUS_OFFLINE) { if (db_get_b(hContact, pszProto, "ChatRoom", 0)) continue; if (db_get_w(hContact, pszProto, "Status", 0) != ID_STATUS_OFFLINE) { @@ -198,7 +198,7 @@ static int StatusSettingChanged(WPARAM wParam, LPARAM lParam) if (currentWatcherType&SDWTF_STATUS) { DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; if ((HANDLE)wParam != nullptr && dbcws->value.wVal == ID_STATUS_OFFLINE && !strcmp(dbcws->szSetting, "Status")) { - char *pszProto = GetContactProto(wParam); + char *pszProto = Proto_GetBaseAccountName(wParam); if (pszProto != nullptr && !strcmp(dbcws->szModule, pszProto)) if (CheckAllContactsOffline()) ShutdownAndStopWatcher(); @@ -234,7 +234,7 @@ static BOOL CALLBACK CpuUsageWatcherProc(BYTE nCpuUsage, LPARAM lParam) static int WeatherUpdated(WPARAM wParam, LPARAM lParam) { - char *pszProto = GetContactProto(wParam); + char *pszProto = Proto_GetBaseAccountName(wParam); if ((BOOL)lParam && pszProto != nullptr && Proto_GetStatus(pszProto) == ID_STATUS_INVISIBLE) if (g_plugin.getByte("WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT)) ServiceShutdown(SDSDT_SHUTDOWN, TRUE); -- cgit v1.2.3