From 0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Sep 2016 19:43:24 +0000 Subject: - chats services replaces with functions; - chat calls switched from CallServiceSync to direct calls everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@17305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/commandmonitor.cpp | 48 +++++++++++++++++------------------ protocols/IRCG/src/input.cpp | 8 +++--- protocols/IRCG/src/ircproto.cpp | 8 +++--- protocols/IRCG/src/main.cpp | 2 ++ protocols/IRCG/src/scripting.cpp | 8 +++--- protocols/IRCG/src/services.cpp | 12 ++++----- protocols/IRCG/src/stdafx.h | 11 ++++---- protocols/IRCG/src/tools.cpp | 6 ++--- 8 files changed, 53 insertions(+), 50 deletions(-) (limited to 'protocols/IRCG') diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 6b369de31f..b291319818 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -96,13 +96,13 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) CMStringW name = GetWord(ppro->m_channelsToWho.c_str(), 0); if (name.IsEmpty()) { ppro->m_channelsToWho = L""; - int count = (int)CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)ppro->m_szModuleName); + int count = pci->SM_GetCount(ppro->m_szModuleName); for (int i = 0; i < count; i++) { GC_INFO gci = { 0 }; gci.Flags = GCF_BYINDEX | GCF_NAME | GCF_TYPE | GCF_COUNT; gci.iItem = i; gci.pszModule = ppro->m_szModuleName; - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) + if (!Chat_GetInfo(&gci) && gci.iType == GCW_CHATROOM) if (gci.iCount <= ppro->m_onlineNotificationLimit) ppro->m_channelsToWho += CMStringW(gci.pszName) + L" "; } @@ -376,7 +376,7 @@ bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg) if (pmsg->prefix.sNick == m_info.sNick) { GCDEST gcd = { m_szModuleName, NULL, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_OFFLINE, (LPARAM)&gce); + CallChatEvent(SESSION_OFFLINE, &gce); } } else ShowMessage(pmsg); @@ -393,7 +393,7 @@ bool CIrcProto::OnIrc_PART(const CIrcMessage* pmsg) CMStringW S = MakeWndID(pmsg->parameters[0].c_str()); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_OFFLINE, (LPARAM)&gce); + CallChatEvent(SESSION_OFFLINE, &gce); } } else ShowMessage(pmsg); @@ -412,7 +412,7 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) CMStringW S = MakeWndID(pmsg->parameters[0].c_str()); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_OFFLINE, (LPARAM)&gce); + CallChatEvent(SESSION_OFFLINE, &gce); if (m_rejoinIfKicked) { CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0); @@ -626,7 +626,7 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) str.Delete(0, 1); CMStringW Wnd = MakeWndID(str.c_str()); gci.pszID = Wnd.c_str(); - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) + if (!Chat_GetInfo(&gci) && gci.iType == GCW_CHATROOM) S2 = GetWord(gci.pszID, 0); else S2 = L""; @@ -1278,7 +1278,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) gcw.ptszID = sID.c_str(); gcw.pszModule = m_szModuleName; gcw.ptszName = sChanName; - if (!CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw)) { + if (!Chat_NewSession(&gcw)) { DBVARIANT dbv; GCDEST gcd = { m_szModuleName, sID.c_str(), GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -1287,17 +1287,17 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) // register the statuses gce.ptszStatus = L"Owner"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); gce.ptszStatus = L"Admin"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); gce.ptszStatus = L"Op"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); gce.ptszStatus = L"Halfop"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); gce.ptszStatus = L"Voice"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); gce.ptszStatus = L"Normal"; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); { int k = 0; CMStringW sTemp = GetWord(sNamesList.c_str(), k); @@ -1333,7 +1333,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) } gce.bIsMe = bIsMe; gce.time = bIsMe ? time(0) : 0; - CallChatEvent(0, (LPARAM)&gce); + CallChatEvent(0, &gce); DoEvent(GC_EVENT_SETCONTACTSTATUS, sChanName, sTemp.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE); // fix for networks like freshirc where they allow more than one prefix if (PrefixToStatus(sTemp2[0]) != L"Normal") { @@ -1407,17 +1407,17 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) save += GetWordAddress(dbv.ptszVal, k); switch (command[0]) { case 'M': - CallChatEvent(WINDOW_HIDDEN, (LPARAM)&gce); + CallChatEvent(WINDOW_HIDDEN, &gce); break; case 'X': - CallChatEvent(WINDOW_MAXIMIZE, (LPARAM)&gce); + CallChatEvent(WINDOW_MAXIMIZE, &gce); break; default: - CallChatEvent(SESSION_INITDONE, (LPARAM)&gce); + CallChatEvent(SESSION_INITDONE, &gce); break; } } - else CallChatEvent(SESSION_INITDONE, (LPARAM)&gce); + else CallChatEvent(SESSION_INITDONE, &gce); if (save.IsEmpty()) db_unset(NULL, m_szModuleName, "JTemp"); @@ -1425,11 +1425,11 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) setWString("JTemp", save.c_str()); db_free(&dbv); } - else CallChatEvent(SESSION_INITDONE, (LPARAM)&gce); + else CallChatEvent(SESSION_INITDONE, &gce); gcd.iType = GC_EVENT_CONTROL; gce.pDest = &gcd; - CallChatEvent(SESSION_ONLINE, (LPARAM)&gce); + CallChatEvent(SESSION_ONLINE, &gce); } } } @@ -2283,7 +2283,7 @@ void CIrcProto::OnIrcDisconnected() GCDEST gcd = { m_szModuleName, 0, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_OFFLINE, (LPARAM)&gce); + CallChatEvent(SESSION_OFFLINE, &gce); if (!Miranda_Terminated()) CList_SetAllOffline(m_disconnectDCCChats); @@ -2344,13 +2344,13 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) } if (m_rejoinChannels) { - int count = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName); + int count = pci->SM_GetCount(m_szModuleName); for (int i = 0; i < count; i++) { GC_INFO gci = { 0 }; gci.Flags = GCF_BYINDEX | GCF_DATA | GCF_NAME | GCF_TYPE; gci.iItem = i; gci.pszModule = m_szModuleName; - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) { + if (!Chat_GetInfo(&gci) && gci.iType == GCW_CHATROOM) { CHANNELINFO *wi = (CHANNELINFO*)gci.dwItemData; if (wi && wi->pszPassword) PostIrcMessage(L"/JOIN %s %s", gci.pszName, wi->pszPassword); @@ -2364,7 +2364,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) { GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_ONLINE, (LPARAM)&gce); + CallChatEvent(SESSION_ONLINE, &gce); } CallFunctionAsync(sttMainThrdOnConnect, this); diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index cbe0852a7c..6cc5de8669 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -221,7 +221,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo if (m_useServer) { GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(command == L"/servershow" ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce); + CallChatEvent(command == L"/servershow" ? WINDOW_VISIBLE : WINDOW_HIDDEN, &gce); } return true; } @@ -252,7 +252,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(WINDOW_CLEARLOG, (LPARAM)&gce); + CallChatEvent(WINDOW_CLEARLOG, &gce); return true; } @@ -368,7 +368,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo gci.Flags = GCF_BYID | GCF_NAME | GCF_COUNT; gci.pszModule = m_szModuleName; gci.pszID = S.c_str(); - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) + if (!Chat_GetInfo(&gci)) mir_snwprintf(szTemp, L"users: %u", gci.iCount); DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false); @@ -477,7 +477,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo CMStringW S = MakeWndID(window); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); + CallChatEvent(SESSION_TERMINATE, &gce); PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1)); return true; diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index a7befd3419..c625469aec 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -199,7 +199,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) gcr.pColors = colors; gcr.ptszDispName = m_tszUserName; gcr.pszModule = m_szModuleName; - CallServiceSync(MS_GC_REGISTER, NULL, (LPARAM)&gcr); + Chat_Register(&gcr); HookProtoEvent(ME_GC_EVENT, &CIrcProto::GCEventHook); HookProtoEvent(ME_GC_BUILDMENU, &CIrcProto::GCMenuHook); @@ -209,14 +209,14 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) gcw.ptszID = SERVERWINDOW; gcw.pszModule = m_szModuleName; gcw.ptszName = NEWWSTR_ALLOCA((wchar_t*)_A2T(m_network)); - CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw); + Chat_NewSession(&gcw); GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; if (m_useServer && !m_hideServerWindow) - CallChatEvent(WINDOW_VISIBLE, (LPARAM)&gce); + CallChatEvent(WINDOW_VISIBLE, &gce); else - CallChatEvent(WINDOW_HIDDEN, (LPARAM)&gce); + CallChatEvent(WINDOW_HIDDEN, &gce); wchar_t szTemp[MAX_PATH]; mir_snwprintf(szTemp, L"%%miranda_path%%\\Plugins\\%S_perform.ini", m_szModuleName); diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index b19e245e13..4629c9fa31 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "version.h" +CHAT_MANAGER *pci; CLIST_INTERFACE *pcli; HINSTANCE hInst = NULL; @@ -90,6 +91,7 @@ static int ircProtoUninit(CIrcProto *ppro) extern "C" int __declspec(dllexport) Load() { mir_getLP(&pluginInfo); + pci = Chat_GetInterface(); pcli = Clist_GetInterface(); InitIcons(); diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index a2586f1258..e4ef002172 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -147,7 +147,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.Flags = GCF_BYID | GCF_COUNT; gci.pszModule = m_szModuleName; gci.pszID = S.c_str(); - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) { + if (!Chat_GetInfo(&gci)) { wchar_t szTemp[40]; mir_snwprintf(szTemp, L"%u", gci.iCount); sOutput = szTemp; @@ -159,12 +159,12 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.Flags = GCF_BYID | GCF_USERS; gci.pszModule = m_szModuleName; gci.pszID = S.c_str(); - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) + if (!Chat_GetInfo(&gci)) return (INT_PTR)mir_strdup(gci.pszUsers); } else if (sRequest == "channellist") { CMStringW S = L""; - int n = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName); + int n = pci->SM_GetCount(m_szModuleName); if (n >= 0) { int j = 0; while (j < n) { @@ -172,7 +172,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.Flags = GCF_BYINDEX | GCF_ID; gci.pszModule = m_szModuleName; gci.iItem = j; - if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) { + if (!Chat_GetInfo(&gci)) { if (mir_wstrcmpi(gci.pszID, SERVERWINDOW)) { CMStringW S1 = gci.pszID; int k = S1.Find(L" "); diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index e97a5abae5..5c208d2ec5 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -35,7 +35,7 @@ void CIrcProto::InitMainMenus(void) if (m_iStatus != ID_STATUS_OFFLINE) mi.flags |= CMIF_GRAYED; mi.name.a = LPGEN("&Join channel"); - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN); + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); mi.pszService = IRC_JOINCHANNEL; mi.position = 201002; hMenuJoin = Menu_AddProtoMenuItem(&mi, m_szModuleName); @@ -208,7 +208,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) S = SERVERWINDOW; GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - int i = CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); + int i = CallChatEvent(SESSION_TERMINATE, &gce); if (i && type == GCW_CHATROOM) PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo); } @@ -253,7 +253,7 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM) CMStringW S = MakeWndID(dbv.ptszVal); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); + CallChatEvent(SESSION_TERMINATE, &gce); } db_free(&dbv); } @@ -369,7 +369,7 @@ INT_PTR __cdecl CIrcProto::OnShowServerMenuCommand(WPARAM, LPARAM) { GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(WINDOW_VISIBLE, (LPARAM)&gce); + CallChatEvent(WINDOW_VISIBLE, &gce); return 0; } @@ -535,7 +535,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) S = MakeWndID(p1); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); + CallChatEvent(SESSION_TERMINATE, &gce); } break; case 4: // show server window @@ -1068,7 +1068,7 @@ void CIrcProto::DisconnectFromServer(void) GCDEST gcd = { m_szModuleName, 0, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); + CallChatEvent(SESSION_TERMINATE, &gce); ForkThread(&CIrcProto::DisconnectServerThread, 0); } diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index 4e8670af7f..e3190007ca 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -54,6 +54,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_skin.h" #include "m_netlib.h" #include "m_langpack.h" +#include "m_chat_int.h" #include "m_message.h" #include "m_userinfo.h" #include "m_addcontact.h" @@ -61,7 +62,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_genmenu.h" #include "m_file.h" #include "m_ignore.h" -#include "m_chat.h" +#include "m_chat_int.h" #include "m_icolib.h" #include "m_string.h" #include "win2k.h" @@ -361,9 +362,9 @@ struct CIrcProto : public PROTO bool CList_SetAllOffline(BYTE ChatsToo); MCONTACT CList_SetOffline(CONTACT *user); - bool CList_AddEvent(CONTACT *user, HICON Icon, HANDLE event, const char *tooltip, int type ) ; + bool CList_AddEvent(CONTACT *user, HICON Icon, HANDLE event, const char *tooltip, int type ); MCONTACT CList_FindContact(CONTACT *user); - BOOL CList_AddDCCChat(const CMStringW &name, const CMStringW &hostmask, unsigned long adr, int port) ; + BOOL CList_AddDCCChat(const CMStringW &name, const CMStringW &hostmask, unsigned long adr, int port); //commandmonitor.cpp UINT_PTR IdentTimer, InitTimer, KeepAliveTimer, OnlineNotifTimer, OnlineNotifTimer3; @@ -374,7 +375,7 @@ struct CIrcProto : public PROTO void __cdecl ResolveIPThread(void *di); bool AddIgnore(const wchar_t *mask, const wchar_t *mode, const wchar_t *network) ; - int IsIgnored(const CMStringW &nick, const CMStringW &address, const CMStringW &host, char type) ; + int IsIgnored(const CMStringW &nick, const CMStringW &address, const CMStringW &host, char type); int IsIgnored(CMStringW user, char type); bool RemoveIgnore(const wchar_t *mask) ; @@ -441,7 +442,7 @@ struct CIrcProto : public PROTO //tools.cpp void AddToJTemp(wchar_t op, CMStringW& sCommand); bool AddWindowItemData(CMStringW window, const wchar_t* pszLimit, const wchar_t* pszMode, const wchar_t* pszPassword, const wchar_t* pszTopic); - INT_PTR CallChatEvent(WPARAM wParam, LPARAM lParam); + INT_PTR CallChatEvent(WPARAM wParam, GCEVENT *); INT_PTR DoEvent(int iEvent, const wchar_t* pszWindow, const wchar_t* pszNick, const wchar_t* pszText, const wchar_t* pszStatus, const wchar_t* pszUserInfo, DWORD_PTR dwItemData, bool bAddToLog, bool bIsMe,time_t timestamp = 1); void FindLocalIP(HANDLE con); bool FreeWindowItemData(CMStringW window, CHANNELINFO* wis); diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index eb3068d7de..c3a1c1e1a1 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -376,9 +376,9 @@ wchar_t* __stdcall DoColorCodes(const wchar_t* text, bool bStrip, bool bReplaceP return szTemp; } -INT_PTR CIrcProto::CallChatEvent(WPARAM wParam, LPARAM lParam) +INT_PTR CIrcProto::CallChatEvent(WPARAM wParam, GCEVENT *lParam) { - return CallServiceSync(MS_GC_EVENT, wParam, (LPARAM)lParam); + return Chat_Event(wParam, lParam); } INT_PTR CIrcProto::DoEvent(int iEvent, const wchar_t* pszWindow, const wchar_t* pszNick, @@ -427,7 +427,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const wchar_t* pszWindow, const wchar_t* else gce.time = timestamp; gce.bIsMe = bIsMe; - return CallChatEvent(0, (LPARAM)&gce); + return CallChatEvent(0, &gce); } CMStringW CIrcProto::ModeToStatus(int sMode) -- cgit v1.2.3