diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-22 00:55:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-22 00:57:16 +0300 |
commit | d28931ebdfc4ff561d05ab000aee4cbb5ac24d62 (patch) | |
tree | e5cfd83eb231df123a3d744106a4e9b521fba409 /protocols/IRCG/src | |
parent | 921f870dd0feec3230a8634abbd85c556e9f3d22 (diff) |
OnEvent(EV_PROTO_ONCONTACTDELETED) => PROTO_INTERFACE::OnContactDeleted
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 3 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.h | 3 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 10 |
3 files changed, 6 insertions, 10 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 6152e22e88..309e65374d 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -818,9 +818,6 @@ int CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONMENU:
InitMainMenus();
break;
-
- case EV_PROTO_ONCONTACTDELETED:
- return OnContactDeleted(wParam, lParam);
}
return 1;
}
diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h index 6948098cd2..9797574c0a 100644 --- a/protocols/IRCG/src/ircproto.h +++ b/protocols/IRCG/src/ircproto.h @@ -70,6 +70,8 @@ struct CIrcProto : public PROTO<CIrcProto> int SetAwayMsg(int m_iStatus, const wchar_t *msg) override; int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override; + + void OnContactDeleted(MCONTACT) override; void OnModulesLoaded() override; void OnShutdown() override; @@ -91,7 +93,6 @@ struct CIrcProto : public PROTO<CIrcProto> INT_PTR __cdecl OnShowServerMenuCommand(WPARAM, LPARAM); // Events - int __cdecl OnContactDeleted(WPARAM, LPARAM); int __cdecl OnInitOptionsPages(WPARAM, LPARAM); int __cdecl OnInitUserInfo(WPARAM, LPARAM); int __cdecl OnMenuPreBuild(WPARAM, LPARAM); diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 0c798257f9..8b4413ce9d 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -172,11 +172,10 @@ INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam) return 0;
}
-int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM)
+void CIrcProto::OnContactDeleted(MCONTACT hContact)
{
- MCONTACT hContact = (MCONTACT)wp;
if (!hContact)
- return 0;
+ return;
DBVARIANT dbv;
if (!getWString(hContact, "Nick", &dbv)) {
@@ -192,9 +191,9 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
}
else {
- BYTE bDCC = getByte((MCONTACT)wp, "DCC", 0);
+ BYTE bDCC = getByte(hContact, "DCC", 0);
if (bDCC) {
- CDccSession *dcc = FindDCCSession((MCONTACT)wp);
+ CDccSession *dcc = FindDCCSession(hContact);
if (dcc)
dcc->Disconnect();
}
@@ -202,7 +201,6 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) db_free(&dbv);
}
- return 0;
}
INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM)
|