From 8543dfc47441a07bf97a24a6ddd5063515d05763 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 16 Feb 2025 13:48:20 +0300 Subject: fix for StatusManager & Weather (also removes old crutch with PF2_NONE) --- plugins/StatusManager/src/commonstatus.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/StatusManager/src/commonstatus.cpp') diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index 7e83949b55..eaa5325616 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -298,8 +298,10 @@ static INT_PTR GetProtocolCountService(WPARAM, LPARAM) int GetStatusFlags(const char *szProto) { - int flags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0); - if (flags == 0) + auto f2 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0); + auto f5 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0); + int flags = f2 & ~f5; + if (flags == 0 && f5) flags = PF2_ONLINE; return flags; -- cgit v1.2.3