diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-18 21:13:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-18 21:14:08 +0300 |
commit | 501fd1fbff6afc11bb0368b82b4a8d9451bee5f3 (patch) | |
tree | b866920cd6602debae44b8c7834a949557482ee7 /protocols/ICQCorp | |
parent | 9f151b736b37b9aba43b14b39afb28563e5a3231 (diff) |
we don't need PSR_URL as well
Diffstat (limited to 'protocols/ICQCorp')
-rw-r--r-- | protocols/ICQCorp/src/protocol.cpp | 46 | ||||
-rw-r--r-- | protocols/ICQCorp/src/protocol.h | 1 | ||||
-rw-r--r-- | protocols/ICQCorp/src/services.cpp | 40 |
3 files changed, 0 insertions, 87 deletions
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;
|