diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-19 09:45:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-19 09:45:39 +0000 |
commit | 4d6a4771d90af0056e15ed14c3655b19023359ca (patch) | |
tree | 4eafc6ea875f50f35bca781aee9bcdb2a1d607ed /protocols/VKontakte | |
parent | 4c228715064267be315d0c5104c33543f0cd7ff8 (diff) |
chat must be initialized inside ME_SYSTEM_MODULESLOADED
git-svn-id: http://svn.miranda-ng.org/main/trunk@7745 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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);
|