From dda548686c0f8b0d0bf03315120132013ffa1bb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Dec 2012 20:22:53 +0000 Subject: useless chat event removed git-svn-id: http://svn.miranda-ng.org/main/trunk@2765 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn.cpp | 1 - protocols/MSN/src/msn_chat.cpp | 6 ++---- protocols/MSN/src/msn_proto.cpp | 8 +------- protocols/MSN/src/msn_proto.h | 23 +++++++++++------------ 4 files changed, 14 insertions(+), 24 deletions(-) (limited to 'protocols/MSN') diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index ca1e2cd041..cd633dcc1c 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -58,7 +58,6 @@ static const PLUGININFOEX pluginInfo = int MSN_GCEventHook(WPARAM wParam, LPARAM lParam); int MSN_GCMenuHook(WPARAM wParam, LPARAM lParam); -int MSN_ChatInit(WPARAM wParam, LPARAM lParam); ///////////////////////////////////////////////////////////////////////////// // Protocol instances diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 620477c6a3..cdeb14d969 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -39,10 +39,8 @@ HANDLE CMsnProto::MSN_GetChatInernalHandle(HANDLE hContact) return result; } - -int CMsnProto::MSN_ChatInit(WPARAM wParam, LPARAM) +int CMsnProto::MSN_ChatInit(ThreadData *info) { - ThreadData *info = (ThreadData*)wParam; InterlockedIncrement(&sttChatID); _ltot(sttChatID, info->mChatID, 10); @@ -95,7 +93,7 @@ void CMsnProto::MSN_ChatStart(ThreadData* info) MSN_StartStopTyping(info, false); - NotifyEventHooks(hInitChat, (WPARAM)info, 0); + MSN_ChatInit(info); // add all participants onto the list GCDEST gcd = { m_szModuleName, { NULL }, GC_EVENT_JOIN }; diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 1d92edf44f..8c31f781ab 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -205,8 +205,7 @@ CMsnProto::~CMsnProto() int CMsnProto::OnModulesLoaded(WPARAM, LPARAM) { - if (msnHaveChatDll) - { + if (msnHaveChatDll) { GCREGISTER gcr = {0}; gcr.cbSize = sizeof(GCREGISTER); gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR | GC_TCHAR; @@ -219,11 +218,6 @@ int CMsnProto::OnModulesLoaded(WPARAM, LPARAM) HookProtoEvent(ME_GC_EVENT, &CMsnProto::MSN_GCEventHook); HookProtoEvent(ME_GC_BUILDMENU, &CMsnProto::MSN_GCMenuHook); - - char szEvent[200]; - mir_snprintf(szEvent, sizeof szEvent, "%s\\ChatInit", m_szModuleName); - hInitChat = CreateHookableEvent(szEvent); - HookProtoEvent(szEvent, &CMsnProto::MSN_ChatInit); } HookProtoEvent(ME_IDLE_CHANGED, &CMsnProto::OnIdleChanged); diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index 5b349bbfc7..c46c5f0665 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -185,7 +185,6 @@ struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject HANDLE hNetlibUser; HANDLE hNetlibUserHttps; HANDLE hHttpsConnection; - HANDLE hInitChat; HANDLE hMSNNudge; HANDLE hMSNAvatarsFolder; @@ -419,6 +418,7 @@ struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject ///////////////////////////////////////////////////////////////////////////////////////// // MSN Chat support + int MSN_ChatInit(ThreadData* info); void MSN_ChatStart(ThreadData* info); void MSN_KillChatSession(TCHAR* id); @@ -426,7 +426,6 @@ struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject int __cdecl MSN_GCEventHook(WPARAM wParam, LPARAM lParam); int __cdecl MSN_GCMenuHook(WPARAM wParam, LPARAM lParam); - int __cdecl MSN_ChatInit(WPARAM wParam, LPARAM lParam); ///////////////////////////////////////////////////////////////////////////////////////// // MSN contact list @@ -451,18 +450,18 @@ struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject void AddDelUserContList(const char* email, const int list, const int netId, const bool del); - void MSN_CreateContList(void); - void MSN_CleanupLists(void); - void MSN_FindYahooUser(const char* email); - bool MSN_RefreshContactList(void); + void MSN_CreateContList(void); + void MSN_CleanupLists(void); + void MSN_FindYahooUser(const char* email); + bool MSN_RefreshContactList(void); - bool MSN_IsMyContact(HANDLE hContact); - bool MSN_IsMeByContact(HANDLE hContact, char* szEmail = NULL); + bool MSN_IsMyContact(HANDLE hContact); + bool MSN_IsMeByContact(HANDLE hContact, char* szEmail = NULL); bool MSN_AddUser(HANDLE hContact, const char* email, int netId, int flags, const char *msg = NULL); void MSN_AddAuthRequest(const char *email, const char *nick, const char *reason); - void MSN_SetContactDb(HANDLE hContact, const char *szEmail); - HANDLE MSN_HContactFromEmail(const char* msnEmail, const char* msnNick = NULL, bool addIfNeeded = false, bool temporary = false); - HANDLE AddToListByEmail(const char *email, const char *nick, DWORD flags); + void MSN_SetContactDb(HANDLE hContact, const char *szEmail); + HANDLE MSN_HContactFromEmail(const char* msnEmail, const char* msnNick = NULL, bool addIfNeeded = false, bool temporary = false); + HANDLE AddToListByEmail(const char *email, const char *nick, DWORD flags); ///////////////////////////////////////////////////////////////////////////////////////// // MSN server groups @@ -484,7 +483,7 @@ struct CMsnProto : public PROTO_INTERFACE, public MZeroedObject ///////////////////////////////////////////////////////////////////////////////////////// // MSN Authentication - int MSN_GetPassportAuth(void); + int MSN_GetPassportAuth(void); char* GenerateLoginBlob(char* challenge); char* HotmailLogin(const char* url); void FreeAuthTokens(void); -- cgit v1.2.3