summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp24
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);