From 1732a6b13f52b573cc4af91c2d9120c596e6bf78 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 7 May 2018 17:50:35 +0200 Subject: PROTOACCOUNT::bIsLocked: lock status to be stored in memory PROTOACCOUNT became a normal class with constructor & destructor --- plugins/StatusManager/src/KeepStatus/keepstatus.cpp | 2 +- plugins/StatusManager/src/commonstatus.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/StatusManager') diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp index cd24606687..1209e46f5c 100644 --- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp +++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp @@ -132,7 +132,7 @@ int SMProto::AssignStatus(int iStatus, int iLastStatus, wchar_t *pwszMsg) return -1; if (iStatus != ID_STATUS_OFFLINE && m_status == ID_STATUS_DISABLED) return -2; - if (!db_get_b(0, KSMODULENAME, SETTING_NOLOCKED, 0) && db_get_b(0, m_szName, "LockMainStatus", 0)) + if (!db_get_b(0, KSMODULENAME, SETTING_NOLOCKED, 0) && Proto_GetAccount(m_szName)->IsLocked()) return -3; mir_cslock lck(GenStatusCS); diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index 13e7108af6..1fa60745dd 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -164,7 +164,7 @@ static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps) if (pstatus == 0) pstatus = pa->iRealStatus; - if (db_get_b(0, pa->szModuleName, "LockMainStatus", 0)) { + if (pa->bIsLocked) { // if proto is locked, pstatus must be the current status if (pstatus != pa->iRealStatus) return 0; -- cgit v1.2.3