From 501fd1fbff6afc11bb0368b82b4a8d9451bee5f3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Jan 2019 21:13:56 +0300 Subject: we don't need PSR_URL as well --- include/delphi/m_protosvc.inc | 32 ----------------------- include/m_protoint.h | 1 - include/m_protosvc.h | 9 ------- libs/win32/mir_app.lib | Bin 188858 -> 188472 bytes libs/win64/mir_app.lib | Bin 184174 -> 183778 bytes protocols/EmLanProto/src/amdproto.cpp | 5 ++-- protocols/EmLanProto/src/mlan.cpp | 31 ++++------------------- protocols/EmLanProto/src/mlan.h | 1 - protocols/ICQCorp/src/protocol.cpp | 46 ---------------------------------- protocols/ICQCorp/src/protocol.h | 1 - protocols/ICQCorp/src/services.cpp | 40 ----------------------------- src/mir_app/src/ignore.cpp | 9 ------- src/mir_app/src/mir_app.def | 1 - src/mir_app/src/mir_app64.def | 1 - src/mir_app/src/proto_internal.cpp | 6 ----- src/mir_app/src/proto_utils.cpp | 5 ---- src/mir_app/src/protocols.cpp | 46 ++++++++++++++++------------------ 17 files changed, 29 insertions(+), 205 deletions(-) diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc index 8edc1b645d..25c55dde3e 100644 --- a/include/delphi/m_protosvc.inc +++ b/include/delphi/m_protosvc.inc @@ -699,26 +699,6 @@ const this event is NOT added to the database automatically. } PSS_MESSAGE = '/SendMsg'; -// PSS_MESSAGEW = '/SendMsgW'; - - { - CCSDATA: Yes - wParam : flags - lParam : null terminated string to the URL, see notes - Affect : Send a URL message, see notes - Returns: A hProcess which will be ack'd later - Notes : lParam may contain TWO strings, the first for URL, the second for - description, in the format : - #0#0 or #0#0 - Will send an ack for hProcess when the URL actually gets sent - type=ACKTYPE_URL, result=ACKRESULT_SUCCESS/FAILURE, - lParam=ansi error message or NIL - - - protocol modules are free to define flags starting at $10000 - - - The event will *not* be added to the database automatically - } - PSS_URL = '/SendUrl'; { CCSDATA: Yes @@ -897,18 +877,6 @@ const MS_PROTO_RECVFILET = 'Proto/RecvFileT'; - { - CCSDATA: Yes - wParam : 0 - lParam : Pointer to a TPROTORECVEVENT, see notes - Affect : A URL has been received - Notes : szMessage is encoded the same as PSS_URL - - - Stored in the database : EVENTTYPE_URL, blob contains message - without null termination - } - PSR_URL = '/RecvUrl'; - { CCSDATA: Yes wParam : 0 diff --git a/include/m_protoint.h b/include/m_protoint.h index b7957f46f1..59b84ea8f5 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -203,7 +203,6 @@ public: virtual int RecvContacts(MCONTACT hContact, PROTORECVEVENT*); virtual int RecvFile(MCONTACT hContact, PROTORECVFILE*); virtual MEVENT RecvMsg(MCONTACT hContact, PROTORECVEVENT*); - virtual int RecvUrl(MCONTACT hContact, PROTORECVEVENT*); virtual int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList); virtual HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles); diff --git a/include/m_protosvc.h b/include/m_protosvc.h index d6a44e7c85..e28e31098b 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -797,15 +797,6 @@ __forceinline INT_PTR ProtoChainRecvFile(MCONTACT hContact, PROTORECVFILE *pre) return Proto_ChainRecv(0, &ccs); } -/////////////////////////////////////////////////////////////////////////////// -// An URL has been received -// wParam = 0 -// lParam = (LPARAM)(PROTORECVEVENT*)&pre -// szMessage is encoded the same as for PSS_URL -// DB event: EVENTTYPE_URL, blob contains szMessage without 0 terminator - -#define PSR_URL "/RecvUrl" - /////////////////////////////////////////////////////////////////////////////// // Contacts have been received // wParam = 0 diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib index fe6362e403..902304c207 100644 Binary files a/libs/win32/mir_app.lib and b/libs/win32/mir_app.lib differ diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib index 5db0ed6550..19cf29fec6 100644 Binary files a/libs/win64/mir_app.lib and b/libs/win64/mir_app.lib differ diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 99746894a0..f4e04fee8c 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -106,7 +106,7 @@ static INT_PTR __cdecl EMPSendMessage(WPARAM, LPARAM lParam) return g_lan->SendMessageUrl((CCSDATA*)lParam); } -static INT_PTR __cdecl EMPRecvMessageUrl(WPARAM, LPARAM lParam) +static INT_PTR __cdecl EMPRecvMessage(WPARAM, LPARAM lParam) { g_lan->RecvMessageUrl((CCSDATA*)lParam); return 0; @@ -333,8 +333,7 @@ int CMPlugin::Load() CreateProtoServiceFunction(MODULENAME, PS_BASICSEARCH, EMPBasicSearch); CreateProtoServiceFunction(MODULENAME, PS_ADDTOLIST, EMPAddToList); CreateProtoServiceFunction(MODULENAME, PSS_MESSAGE, EMPSendMessage); - CreateProtoServiceFunction(MODULENAME, PSR_MESSAGE, EMPRecvMessageUrl); - CreateProtoServiceFunction(MODULENAME, PSR_URL, EMPRecvMessageUrl); + CreateProtoServiceFunction(MODULENAME, PSR_MESSAGE, EMPRecvMessage); CreateProtoServiceFunction(MODULENAME, PSS_GETAWAYMSG, EMPGetAwayMsg); CreateProtoServiceFunction(MODULENAME, PS_SETAWAYMSG, EMPSetAwayMsg); CreateProtoServiceFunction(MODULENAME, PSR_AWAYMSG, EMPRecvAwayMessage); diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index cf15c9f7e2..8663478667 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -295,13 +295,11 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from) PROTORECVEVENT pre = { 0 }; pre.timestamp = get_time(); pre.szMessage = pak.strMessage; - ProtoChainRecv(FindContact(cont->m_addr, cont->m_nick, true, false, false, cont->m_status), - pak.flIsUrl ? PSR_URL : PSR_MESSAGE, 0, (LPARAM)&pre); + ProtoChainRecv(FindContact(cont->m_addr, cont->m_nick, true, false, false, cont->m_status), PSR_MESSAGE, 0, (LPARAM)&pre); TPacket npak; memset(&npak, 0, sizeof(npak)); npak.idAckMessage = pak.idMessage; - npak.flIsUrl = pak.flIsUrl; SendPacketExt(npak, from.S_un.S_addr); } } @@ -309,7 +307,7 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from) if (pak.idAckMessage && cont) { MCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false); if (hContact) - ProtoBroadcastAck(MODULENAME, hContact, pak.flIsUrl ? ACKTYPE_URL : ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pak.idAckMessage, 0); + ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pak.idAckMessage, 0); } if (pak.strAwayMessage && cont) { @@ -352,10 +350,7 @@ void CMLan::RecvMessageUrl(CCSDATA *ccs) ptrA szMessage(mir_utf8encode(pre->szMessage)); DBEVENTINFO dbei = {}; - if (!mir_strcmp(ccs->szProtoService, PSR_MESSAGE)) - dbei.eventType = EVENTTYPE_MESSAGE; - else - dbei.eventType = EVENTTYPE_URL; + dbei.eventType = EVENTTYPE_MESSAGE; dbei.szModule = MODULENAME; dbei.timestamp = pre->timestamp; dbei.flags = DBEF_UTF + ((pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0); @@ -484,8 +479,6 @@ void CMLan::SendMessageExt(TDataHolder *hold) u_long addr = g_plugin.getDword(hold->hContact, "ipaddr"); pak.strMessage = mir_utf8decode(hold->msg, 0); pak.idMessage = hold->id; - if (hold->op == LEXT_SENDURL) - pak.flIsUrl = true; SendPacketExt(pak, addr); } delete hold; @@ -572,8 +565,6 @@ u_char* CMLan::CreatePacket(TPacket &pak, int *pBufLen) size_t mesLen = 0; if (pak.strMessage) { mesLen = mir_strlen(pak.strMessage); - if (pak.flIsUrl) - mesLen += 1 + mir_strlen(pak.strMessage + mesLen + 1); len += 3 + 1 + 4 + mesLen + 1; } @@ -624,10 +615,7 @@ u_char* CMLan::CreatePacket(TPacket &pak, int *pBufLen) *pb++ = 255; *((u_short*)pb) = 1 + 4 + (BYTE)mesLen + 1; pb += sizeof(u_short); - if (pak.flIsUrl) - *pb++ = MCODE_SND_URL; - else - *pb++ = MCODE_SND_MESSAGE; + *pb++ = MCODE_SND_MESSAGE; *((u_int*)pb) = pak.idMessage; pb += sizeof(u_int); if (mesLen) @@ -638,10 +626,7 @@ u_char* CMLan::CreatePacket(TPacket &pak, int *pBufLen) if (pak.idAckMessage) { *pb++ = 1 + 4; - if (pak.flIsUrl) - *pb++ = MCODE_ACK_URL; - else - *pb++ = MCODE_ACK_MESSAGE; + *pb++ = MCODE_ACK_MESSAGE; *((u_int*)pb) = pak.idAckMessage; pb += sizeof(u_int); } @@ -696,17 +681,11 @@ void CMLan::ParsePacket(TPacket& pak, u_char* buf, int len) case MCODE_REQ_STATUS: pak.flReqStatus = true; break; - case MCODE_SND_URL: - pak.flIsUrl = true; - // fall through case MCODE_SND_MESSAGE: pak.idMessage = *((u_int*)pb); pb += sizeof(u_int); pak.strMessage = (char*)pb; break; - case MCODE_ACK_URL: - pak.flIsUrl = true; - // fall through case MCODE_ACK_MESSAGE: pak.idAckMessage = *((u_int*)pb); //pb += sizeof(u_int); diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h index 1af49fe6ce..74d2f41fe8 100644 --- a/protocols/EmLanProto/src/mlan.h +++ b/protocols/EmLanProto/src/mlan.h @@ -124,7 +124,6 @@ private: bool flReqStatus; // false means no request char* strMessage; // NULL means no message int idMessage; - bool flIsUrl; // true if message is an URL int idAckMessage; // 0 means no ack int idReqAwayMessage; // 0 means no request char* strAwayMessage; // NULL means no away message diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index cfc2675148..6252029fad 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -857,11 +857,6 @@ void ICQ::processSystemMessage(Packet &packet, unsigned long checkUin, unsigned addMessage(u, message, timeSent); break; - case ICQ_CMDxRCV_SYSxURL: - Netlib_Logf(hNetlibUser, "url through server from %d\n", checkUin); - addUrl(u, message, timeSent); - break; - case ICQ_CMDxRCV_SYSxBROADCAST: Netlib_Logf(hNetlibUser, "broadcast message from %d\n", checkUin); @@ -1789,15 +1784,6 @@ void ICQ::processTcpPacket(Packet &packet, unsigned int hSocket) >> cicqVersion; break; - case ICQ_CMDxTCP_URL: // url sent - Netlib_Logf(hNetlibUser, "[tcp] url from %d.\n", checkUin); - - packet >> theTCPSequence; - - ackTCP(packet, u, newCommand, theTCPSequence); - addUrl(u, message, time(0)); - break; - case ICQ_CMDxTCP_FILE: unsigned int size; char *fileName; @@ -2089,38 +2075,6 @@ void ICQ::addMessage(ICQUser *u, char *m, time_t t) /////////////////////////////////////////////////////////////////////////////// -void ICQ::addUrl(ICQUser *u, char *m, time_t t) -{ - unsigned int i, messageLen; - char *url; - - messageLen = (int)mir_strlen(m); - for (i = 0; i < messageLen; i++) - if (m[i] == -2) // 0xFE - m[i] = 0; - - url = new char[messageLen + 1]; - lstrcpyA(url, m + mir_strlen(m) + 1); - lstrcpyA(url + mir_strlen(url) + 1, m); - - PROTORECVEVENT pre; - pre.flags = 0; - pre.timestamp = t; - pre.szMessage = url; - pre.lParam = 0; - - CCSDATA ccs; - ccs.hContact = u->hContact; - ccs.szProtoService = PSR_URL; - ccs.wParam = 0; - ccs.lParam = (LPARAM)⪯ - Proto_ChainRecv(0, &ccs); - - delete[] url; -} - -/////////////////////////////////////////////////////////////////////////////// - void ICQ::addAwayMsg(ICQUser *u, char *m, unsigned long theSequence, time_t t) { Netlib_Logf(hNetlibUser, "away msg: %s\n", m); diff --git a/protocols/ICQCorp/src/protocol.h b/protocols/ICQCorp/src/protocol.h index 9374f77d01..ba75de163b 100644 --- a/protocols/ICQCorp/src/protocol.h +++ b/protocols/ICQCorp/src/protocol.h @@ -185,7 +185,6 @@ public: void recvTransferTCP(SOCKET hSocket); void addMessage(ICQUser *u, char *m, time_t t); - void addUrl(ICQUser *u, char *m, time_t t); void addAwayMsg(ICQUser *u, char *m, unsigned long theSequence, time_t t); void addFileReq(ICQUser *u, char *m, char *filename, unsigned long size, unsigned long theSequence, time_t t); void doneUserFcn(bool ack, ICQEvent *icqEvent); diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index 850bb8173f..11f444c53b 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -209,44 +209,6 @@ static INT_PTR icqRecvMessage(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////// -static INT_PTR icqSendUrl(WPARAM, LPARAM lParam) -{ - Netlib_Logf(hNetlibUser, "[ ] send url\n"); - - CCSDATA *ccs = (CCSDATA *)lParam; - ICQUser *u = icq.getUserByContact(ccs->hContact); - if (u == nullptr || icq.statusVal <= ID_STATUS_OFFLINE) - return 0; - - ICQEvent *icqEvent = icq.sendUrl(u, (char*)ccs->lParam); - return icqEvent ? icqEvent->sequence : 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -static INT_PTR icqRecvUrl(WPARAM, LPARAM lParam) -{ - Netlib_Logf(hNetlibUser, "[ ] receive url\n"); - - CCSDATA *ccs = (CCSDATA*)lParam; - PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam; - db_unset(ccs->hContact, "CList", "Hidden"); - - char *pszDescr = pre->szMessage + mir_strlen(pre->szMessage) + 1; - - DBEVENTINFO dbei = {}; - dbei.szModule = protoName; - dbei.timestamp = pre->timestamp; - dbei.flags = pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0); - dbei.eventType = EVENTTYPE_URL; - dbei.cbBlob = (DWORD)(mir_strlen(pre->szMessage) + mir_strlen(pszDescr) + 2); - dbei.pBlob = (PBYTE)pre->szMessage; - db_event_add(ccs->hContact, &dbei); - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// - static INT_PTR icqSetAwayMsg(WPARAM, LPARAM lParam) { Netlib_Logf(hNetlibUser, "[ ] set away msg\n"); @@ -504,7 +466,6 @@ int LoadServices() CreateProtoServiceFunction(protoName, PSS_GETINFO, icqGetInfo); CreateProtoServiceFunction(protoName, PSS_MESSAGE, icqSendMessage); - CreateProtoServiceFunction(protoName, PSS_URL, icqSendUrl); CreateProtoServiceFunction(protoName, PSS_GETAWAYMSG, icqGetAwayMsg); CreateProtoServiceFunction(protoName, PSS_FILE, icqSendFile); CreateProtoServiceFunction(protoName, PSS_FILEALLOW, icqFileAllow); @@ -513,7 +474,6 @@ int LoadServices() CreateProtoServiceFunction(protoName, PSS_SETAPPARENTMODE, icqSetApparentMode); CreateProtoServiceFunction(protoName, PSR_MESSAGE, icqRecvMessage); - CreateProtoServiceFunction(protoName, PSR_URL, icqRecvUrl); CreateProtoServiceFunction(protoName, PSR_AWAYMSG, icqRecvAwayMsg); CreateProtoServiceFunction(protoName, PSR_FILE, icqRecvFile); return 0; diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp index ae2c2a341c..c7da59c362 100644 --- a/src/mir_app/src/ignore.cpp +++ b/src/mir_app/src/ignore.cpp @@ -379,14 +379,6 @@ static INT_PTR IgnoreRecvMessage(WPARAM wParam, LPARAM lParam) return Proto_ChainRecv(wParam, ccs); } -static INT_PTR IgnoreRecvUrl(WPARAM wParam, LPARAM lParam) -{ - CCSDATA *ccs = (CCSDATA*)lParam; - if (IsIgnored(ccs->hContact, IGNOREEVENT_URL)) - return 1; - return Proto_ChainRecv(wParam, ccs); -} - static INT_PTR IgnoreRecvFile(WPARAM wParam, LPARAM lParam) { CCSDATA *ccs = (CCSDATA*)lParam; @@ -419,7 +411,6 @@ int LoadIgnoreModule(void) Proto_RegisterModule(PROTOTYPE_IGNORE, "Ignore"); CreateProtoServiceFunction("Ignore", PSR_MESSAGE, IgnoreRecvMessage); - CreateProtoServiceFunction("Ignore", PSR_URL, IgnoreRecvUrl); CreateProtoServiceFunction("Ignore", PSR_FILE, IgnoreRecvFile); CreateProtoServiceFunction("Ignore", PSR_AUTH, IgnoreRecvAuth); diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 3aee20c8d4..b7feb9939b 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -56,7 +56,6 @@ Skin_GetIconName @24 ?RecvContacts@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @58 NONAME ?RecvFile@PROTO_INTERFACE@@UAEHIPAUPROTORECVFILE@@@Z @59 NONAME ?RecvMsg@PROTO_INTERFACE@@UAEIIPAUPROTORECVEVENT@@@Z @60 NONAME -?RecvUrl@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @61 NONAME ?SearchAdvanced@PROTO_INTERFACE@@UAEPAUHWND__@@PAU2@@Z @62 NONAME ?SearchBasic@PROTO_INTERFACE@@UAEPAXPB_W@Z @63 NONAME ?SearchByEmail@PROTO_INTERFACE@@UAEPAXPB_W@Z @64 NONAME diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 208676636e..f4fc8d7df4 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -56,7 +56,6 @@ Skin_GetIconName @24 ?RecvContacts@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @58 NONAME ?RecvFile@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVFILE@@@Z @59 NONAME ?RecvMsg@PROTO_INTERFACE@@UEAAIIPEAUPROTORECVEVENT@@@Z @60 NONAME -?RecvUrl@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @61 NONAME ?SearchAdvanced@PROTO_INTERFACE@@UEAAPEAUHWND__@@PEAU2@@Z @62 NONAME ?SearchBasic@PROTO_INTERFACE@@UEAAPEAXPEB_W@Z @63 NONAME ?SearchByEmail@PROTO_INTERFACE@@UEAAPEAXPEB_W@Z @64 NONAME diff --git a/src/mir_app/src/proto_internal.cpp b/src/mir_app/src/proto_internal.cpp index 919d779c56..4bd2dfca4d 100644 --- a/src/mir_app/src/proto_internal.cpp +++ b/src/mir_app/src/proto_internal.cpp @@ -206,12 +206,6 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (res == CALLSERVICE_NOTFOUND) ? -1 : (int)res; } - int RecvUrl(MCONTACT hContact, PROTORECVEVENT* evt) override - { - CCSDATA ccs = { hContact, PSR_URL, 0, (LPARAM)evt }; - return (int)ProtoCallService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs); - } - int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override { CCSDATA ccs = { hContact, PSS_CONTACTS, MAKEWPARAM(flags, nContacts), (LPARAM)hContactsList }; diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 6b3a6aa40a..9e575e3d00 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -535,11 +535,6 @@ MEVENT PROTO_INTERFACE::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) return (INT_PTR)db_event_add(hContact, &dbei); } -int PROTO_INTERFACE::RecvUrl(MCONTACT, PROTORECVEVENT*) -{ - return 1; // error -} - int PROTO_INTERFACE::SendContacts(MCONTACT, int, int, MCONTACT*) { return 1; // error diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index e2eb88bbc4..28a893f770 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -64,18 +64,17 @@ static TServiceListItem serviceItems[] = { PSR_CONTACTS, 20 }, { PSR_FILE, 21 }, { PSR_MESSAGE, 22 }, - { PSR_URL, 23 }, - { PSS_CONTACTS, 24 }, - { PSS_FILE, 25 }, - { PSS_MESSAGE, 26 }, - { PSS_SETAPPARENTMODE, 27 }, - { PS_SETSTATUS, 28 }, - { PSS_GETAWAYMSG, 29 }, - { PSR_AWAYMSG, 30 }, - { PS_SETAWAYMSG, 31 }, - { PSS_USERISTYPING, 32 }, - { PS_GETNAME, 33 }, - { PS_GETSTATUS, 34 } + { PSS_CONTACTS, 23 }, + { PSS_FILE, 24 }, + { PSS_MESSAGE, 25 }, + { PSS_SETAPPARENTMODE, 26 }, + { PS_SETSTATUS, 27 }, + { PSS_GETAWAYMSG, 28 }, + { PSR_AWAYMSG, 29 }, + { PS_SETAWAYMSG, 30 }, + { PSS_USERISTYPING, 31 }, + { PS_GETNAME, 32 }, + { PS_GETSTATUS, 33 } }; //------------------------------------------------------------------------------------ @@ -425,18 +424,17 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char case 20: return (INT_PTR)ppi->RecvContacts(hContact, (PROTORECVEVENT*)lParam); case 21: return (INT_PTR)ppi->RecvFile(hContact, (PROTORECVFILE*)lParam); case 22: return (INT_PTR)ppi->RecvMsg(hContact, (PROTORECVEVENT*)lParam); - case 23: return (INT_PTR)ppi->RecvUrl(hContact, (PROTORECVEVENT*)lParam); - case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam); - case 25: return (INT_PTR)ppi->SendFile(hContact, (wchar_t*)wParam, (wchar_t**)lParam); - case 26: return (INT_PTR)ppi->SendMsg(hContact, wParam, (const char*)lParam); - case 27: return (INT_PTR)ppi->SetApparentMode(hContact, wParam); - case 28: return (INT_PTR)ppi->SetStatus(wParam); - case 29: return (INT_PTR)ppi->GetAwayMsg(hContact); - case 30: return (INT_PTR)ppi->RecvAwayMsg(hContact, wParam, (PROTORECVEVENT*)lParam); - case 31: return (INT_PTR)ppi->SetAwayMsg(wParam, (wchar_t*)lParam); - case 32: return (INT_PTR)ppi->UserIsTyping(wParam, lParam); - case 33: mir_strncpy((char*)lParam, ppi->m_szModuleName, wParam); return 0; - case 34: + case 23: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam); + case 24: return (INT_PTR)ppi->SendFile(hContact, (wchar_t*)wParam, (wchar_t**)lParam); + case 25: return (INT_PTR)ppi->SendMsg(hContact, wParam, (const char*)lParam); + case 26: return (INT_PTR)ppi->SetApparentMode(hContact, wParam); + case 27: return (INT_PTR)ppi->SetStatus(wParam); + case 28: return (INT_PTR)ppi->GetAwayMsg(hContact); + case 29: return (INT_PTR)ppi->RecvAwayMsg(hContact, wParam, (PROTORECVEVENT*)lParam); + case 30: return (INT_PTR)ppi->SetAwayMsg(wParam, (wchar_t*)lParam); + case 31: return (INT_PTR)ppi->UserIsTyping(wParam, lParam); + case 32: mir_strncpy((char*)lParam, ppi->m_szModuleName, wParam); return 0; + case 33: return ppi->m_iStatus; } } -- cgit v1.2.3