diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-06 08:48:05 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-06 08:48:05 +0000 |
commit | 1fe5efe1a0d68144c211464fcbe1da7cdc803c72 (patch) | |
tree | f6f91a48edc1474f2e0d844cb09497a362f9847e /protocols/VKontakte/src/vk_proto.cpp | |
parent | 82097d8766b1681040983a93fee92319496ee9d7 (diff) |
VKontakte: fix for set server status
git-svn-id: http://svn.miranda-ng.org/main/trunk@10379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index d2191bc4b2..e12e19ae5e 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -17,6 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
+static int sttCompareProtocols(const CVkProto *p1, const CVkProto *p2)
+{
+ return lstrcmp(p1->m_tszUserName, p2->m_tszUserName);
+}
+
+LIST<CVkProto> vk_Instances(1, sttCompareProtocols);
+
static COLORREF sttColors[] = { 0, 1, 2, 3, 4, 5, 6 };
CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) :
@@ -61,12 +68,14 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : // Set all contacts offline -- in case we crashed
SetAllContactStatuses(ID_STATUS_OFFLINE);
+ vk_Instances.insert(this);
}
CVkProto::~CVkProto()
{
Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL;
UninitQueue();
+ vk_Instances.remove(this);
}
int CVkProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
|