From 4d6a4771d90af0056e15ed14c3655b19023359ca Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 19 Jan 2014 09:45:39 +0000 Subject: chat must be initialized inside ME_SYSTEM_MODULESLOADED git-svn-id: http://svn.miranda-ng.org/main/trunk@7745 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_proto.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'protocols/VKontakte/src/vk_proto.cpp') diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 102ca3b24e..8c1baa072c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -55,6 +55,18 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : m_bServerDelivery = getBool("ServerDelivery", true); m_bHideChats = getBool("HideChats", true); + // Set all contacts offline -- in case we crashed + SetAllContactStatuses(ID_STATUS_OFFLINE); +} + +CVkProto::~CVkProto() +{ + Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL; + UninitQueue(); +} + +int CVkProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam) +{ // Chats GCREGISTER gcr = { sizeof(gcr) }; gcr.ptszDispName = m_tszUserName; @@ -68,18 +80,6 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : HookProtoEvent(ME_GC_EVENT, &CVkProto::OnChatEvent); HookProtoEvent(ME_GC_BUILDMENU, &CVkProto::OnGcMenuHook); - // Set all contacts offline -- in case we crashed - SetAllContactStatuses(ID_STATUS_OFFLINE); -} - -CVkProto::~CVkProto() -{ - Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL; - UninitQueue(); -} - -int CVkProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam) -{ char szService[100]; mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_CREATECHAT); -- cgit v1.2.3