diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-26 15:19:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-26 15:19:17 +0000 |
commit | 30b3cd352057c79cf26e1ce73a8c6554cbb4b7be (patch) | |
tree | b6d9b287c6b547e68a18bba25d243b3d8c252d72 /protocols/Skype/src/skype_events.cpp | |
parent | 0fdbd8fce63637a7abf746942060f858b225af7d (diff) |
cleanup project
git-svn-id: http://svn.miranda-ng.org/main/trunk@4534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index d88d6016e2..56fc74a695 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -5,9 +5,7 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) this->InitChat();
this->InitNetLib();
this->InitCustomFolders();
-
- this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit);
- this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit);
+ this->InitInstanceHookList();
g_skype->SetOnMessageCallback(
(CSkype::OnMessaged)&CSkypeProto::OnMessage,
@@ -20,6 +18,7 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM) {
this->SetStatus(ID_STATUS_OFFLINE);
+ this->UninitInstanceHookList();
this->UninitNetLib();
return 0;
@@ -52,17 +51,13 @@ int CSkypeProto::OnMessagePreCreate(WPARAM, LPARAM lParam) MessageWindowEvent *evt = (MessageWindowEvent *)lParam;
MessageRef message(evt->seq);
-
SEBinary guid;
if (message->GetPropGuid(guid))
{
- evt->dbei->pBlob = (PBYTE)::mir_realloc(evt->dbei->pBlob, (evt->dbei->cbBlob + 33));
- ::memcpy(&evt->dbei->pBlob[evt->dbei->cbBlob], guid.data(), 32);
- evt->dbei->cbBlob += 33;
+ evt->dbei->pBlob = (PBYTE)::mir_realloc(evt->dbei->pBlob, guid.size() + 1);
+ ::strncpy((char *)&evt->dbei->pBlob[evt->dbei->cbBlob], guid.data(), guid.size());
}
- //delete message;
-
return 1;
}
@@ -387,7 +382,7 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa this->AddChatContact(
cid,
sid,
- ::mir_utf8decodeW(CParticipant::GetRankName(CParticipant::WRITER)),
+ CSkypeProto::Roles[CParticipant::WRITER],
status);
}
}
|