From f60c78abfbd5f279b30de729046b805bba8e00b0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Apr 2018 20:14:21 +0300 Subject: Proto_GetStatus is used everywhere instead of PS_GETSTATUS --- plugins/AutoShutdown/src/watcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/AutoShutdown/src') diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 876d3a568e..9c55326902 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -178,7 +178,7 @@ static BOOL CheckAllContactsOffline(void) fSmartCheck = db_get_b(NULL, "AutoShutdown", "SmartOfflineCheck", SETTING_SMARTOFFLINECHECK_DEFAULT); for (auto &hContact : Contacts()) { char *pszProto = GetContactProto(hContact); - if (pszProto != nullptr && CallProtoService(pszProto, PS_GETSTATUS, 0, 0) != ID_STATUS_OFFLINE) { + 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) { if (fSmartCheck) { @@ -235,7 +235,7 @@ static BOOL CALLBACK CpuUsageWatcherProc(BYTE nCpuUsage, LPARAM lParam) static int WeatherUpdated(WPARAM wParam, LPARAM lParam) { char *pszProto = GetContactProto(wParam); - if ((BOOL)lParam && pszProto != nullptr && CallProtoService(pszProto, PS_GETSTATUS, 0, 0) == THUNDER) + if ((BOOL)lParam && pszProto != nullptr && Proto_GetStatus(pszProto) == THUNDER) if (db_get_b(NULL, "AutoShutdown", "WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT)) ServiceShutdown(SDSDT_SHUTDOWN, TRUE); return 0; -- cgit v1.2.3