diff options
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);
}
}
|