summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/FileAsMessage/src/main.cpp6
-rw-r--r--plugins/Jingle/src/account.cpp8
-rw-r--r--plugins/MirLua/src/Modules/m_protocols.cpp5
-rw-r--r--plugins/MirOTR/src/svcs_proto.cpp16
-rw-r--r--plugins/MirOTR/src/utils.cpp20
-rw-r--r--plugins/New_GPG/src/messages.cpp8
-rw-r--r--plugins/Scriver/src/globals.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp4
-rw-r--r--plugins/SecureIM/src/crypt_dll.cpp4
-rw-r--r--plugins/SecureIM/src/svcs_proto.cpp28
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
-rw-r--r--plugins/Watrack/proto/proto.pas32
13 files changed, 63 insertions, 74 deletions
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 213c64d6de..d19e7c2b37 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -124,9 +124,9 @@ INT_PTR OnSendFile(WPARAM wParam, LPARAM)
INT_PTR OnRecvMessage(WPARAM wParam, LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA *)lParam;
- PROTORECVEVENT *ppre = (PROTORECVEVENT *)ccs->lParam;
+ auto *dbei = (DB::EventInfo*)ccs->lParam;
- if (strncmp(ppre->szMessage, szServicePrefix, mir_strlen(szServicePrefix)))
+ if (strncmp(dbei->pBlob, szServicePrefix, mir_strlen(szServicePrefix)))
return Proto_ChainRecv(wParam, ccs);
HWND hwnd = WindowList_Find(hFileList, ccs->hContact);
@@ -142,7 +142,7 @@ INT_PTR OnRecvMessage(WPARAM wParam, LPARAM lParam)
return 0;
}
}
- char *msg = mir_strdup(ppre->szMessage + mir_strlen(szServicePrefix));
+ char *msg = mir_strdup(dbei->pBlob + mir_strlen(szServicePrefix));
PostMessage(hwnd, WM_FE_MESSAGE, (WPARAM)ccs->hContact, (LPARAM)msg);
return 0;
diff --git a/plugins/Jingle/src/account.cpp b/plugins/Jingle/src/account.cpp
index b2be77922b..9a334942e1 100644
--- a/plugins/Jingle/src/account.cpp
+++ b/plugins/Jingle/src/account.cpp
@@ -127,10 +127,10 @@ static BOOL OnProcessJingle(struct IJabberInterface *api, const TiXmlElement *no
}
// Save this event to history
- PROTORECVEVENT recv = {};
- recv.timestamp = (uint32_t)time(0);
- recv.szMessage = "** A call while we were busy **";
- ProtoChainRecvMsg(api->ContactFromJID(from), &recv);
+ DB::EventInfo dbei;
+ dbei.timestamp = (uint32_t)time(0);
+ dbei.pBlob = "** A call while we were busy **";
+ ProtoChainRecvMsg(api->ContactFromJID(from), dbei);
reason = "busy";
}
diff --git a/plugins/MirLua/src/Modules/m_protocols.cpp b/plugins/MirLua/src/Modules/m_protocols.cpp
index a34f262780..32c8e34590 100644
--- a/plugins/MirLua/src/Modules/m_protocols.cpp
+++ b/plugins/MirLua/src/Modules/m_protocols.cpp
@@ -299,10 +299,5 @@ LUAMOD_API int luaopen_m_protocols(lua_State *L)
.Field(&CCSDATA::lParam, "lParam", LUA_TLIGHTUSERDATA)
.Field(&CCSDATA::lParam, "Message", LUA_TSTRING);
- MT<PROTORECVEVENT>(L, "PROTORECVEVENT")
- .Field(&PROTORECVEVENT::timestamp, "Timestamp", LUA_TINTEGER)
- .Field(&PROTORECVEVENT::flags, "Flags", LUA_TINTEGER)
- .Field(&PROTORECVEVENT::szMessage, "Message", LUA_TSTRING);
-
return 1;
}
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp
index 038500363b..38f1bb401c 100644
--- a/plugins/MirOTR/src/svcs_proto.cpp
+++ b/plugins/MirOTR/src/svcs_proto.cpp
@@ -76,13 +76,13 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA *) lParam;
- PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
+ auto *dbei = (DB::EventInfo *) ccs->lParam;
DEBUGOUTA("OTR - receiving message: '");
- DEBUGOUTA(pre->szMessage);
+ DEBUGOUTA(dbei->pBlob);
DEBUGOUTA("'\n");
- if (pre->flags & PREF_BYPASS_OTR) // bypass for our inline messages
+ if (dbei->flags & PREF_BYPASS_OTR) // bypass for our inline messages
return Proto_ChainRecv(wParam, ccs);
char *proto = Proto_GetBaseAccountName(ccs->hContact);
@@ -91,7 +91,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
else if(proto && mir_strcmp(proto, META_PROTO) == 0) // bypass for metacontacts
return Proto_ChainRecv(wParam, ccs);
- char *oldmessage = pre->szMessage;
+ char *oldmessage = dbei->pBlob;
// convert oldmessage to utf-8
if (!oldmessage)
return 1;
@@ -125,7 +125,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
if (newmessage == nullptr)
return Proto_ChainRecv(wParam, ccs);
- uint32_t oldflags = pre->flags;
+ uint32_t oldflags = dbei->flags;
typedef void (*msg_free_t)(void*);
msg_free_t msg_free = (msg_free_t)otrl_message_free;
@@ -142,11 +142,11 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
replaceStr(newmessage, tmp.Detach());
msg_free = mir_free;
}
- pre->szMessage = newmessage;
+ dbei->pBlob = newmessage;
BOOL ret = Proto_ChainRecv(wParam, ccs);
/// @todo (White-Tiger#1#03/23/15): why are we doing this?
- pre->flags = oldflags;
- pre->szMessage = oldmessage;
+ dbei->flags = oldflags;
+ dbei->pBlob = oldmessage;
msg_free(newmessage);
return ret;
}
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 76b4d03c96..af6c8eb928 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -215,11 +215,11 @@ void ShowMessageInline(const MCONTACT hContact, const wchar_t *msg)
mir_snwprintf(buff, L"%s%s", _A2W(LANG_INLINE_PREFIX), msg);
T2Utf utf(buff);
- PROTORECVEVENT pre = { 0 };
- pre.timestamp = time(0);
- pre.szMessage = utf;
- pre.flags = PREF_BYPASS_OTR;
- ProtoChainRecvMsg(hContact, &pre);
+ DB::EventInfo dbei;
+ dbei.timestamp = time(0);
+ dbei.pBlob = utf;
+ dbei.flags = PREF_BYPASS_OTR;
+ ProtoChainRecvMsg(hContact, dbei);
}
void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg)
@@ -227,11 +227,11 @@ void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg)
char buff[1024];
mir_snprintf(buff, "%s%s", LANG_INLINE_PREFIX, msg);
- PROTORECVEVENT pre = { 0 };
- pre.timestamp = time(0);
- pre.szMessage = buff;
- pre.flags = PREF_BYPASS_OTR;
- ProtoChainRecvMsg(hContact, &pre);
+ DB::EventInfo dbei;
+ dbei.timestamp = time(0);
+ dbei.pBlob = buff;
+ dbei.flags = PREF_BYPASS_OTR;
+ ProtoChainRecvMsg(hContact, dbei);
}
void ShowMessageUtf(const MCONTACT hContact, const char *msg)
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index c9c89bf0f3..b3bd5e286c 100644
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -299,11 +299,11 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if (!ccs)
return Proto_ChainRecv(w, ccs);
- PROTORECVEVENT *pre = (PROTORECVEVENT*)(ccs->lParam);
- if (!pre)
+ auto *dbei = (DB::EventInfo*)(ccs->lParam);
+ if (!dbei)
return Proto_ChainRecv(w, ccs);
- char *msg = pre->szMessage;
+ char *msg = dbei->pBlob;
if (!msg)
return Proto_ChainRecv(w, ccs);
@@ -497,7 +497,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if (!strstr(msg, "-----BEGIN PGP MESSAGE-----"))
return Proto_ChainRecv(w, ccs);
- mir_forkThread<RecvParams>(RecvMsgSvc_func, new RecvParams(ccs->hContact, str, msg, pre->timestamp));
+ mir_forkThread<RecvParams>(RecvMsgSvc_func, new RecvParams(ccs->hContact, str, msg, dbei->timestamp));
return 0;
}
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 23bbc7af31..6ec8c203bd 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -127,7 +127,7 @@ static int ackevent(WPARAM, LPARAM lParam)
DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
- dbei.flags = DBEF_UTF | DBEF_SENT | ((item->flags & PREF_RTL) ? DBEF_RTL : 0);
+ dbei.flags = DBEF_UTF | DBEF_SENT | (item->flags & DBEF_RTL);
dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.timestamp = time(0);
dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 0ab0d77f11..b75ab78c42 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -298,7 +298,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
SendQueue::Item msi = {};
if (pf2.wEffects & PFE_RTLPARA)
- msi.flags |= PREF_RTL;
+ msi.flags |= DBEF_RTL;
msi.sendBuffer = m_message.GetRichTextRtf(true);
msi.sendBufferSize = (int)mir_strlen(msi.sendBuffer);
@@ -306,7 +306,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
return;
if (Utils_IsRtl(ptrW(mir_utf8decodeW(msi.sendBuffer))))
- msi.flags |= PREF_RTL;
+ msi.flags |= DBEF_RTL;
// Store messaging history
TCmdList *cmdListNew = tcmdlist_last(cmdList);
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp
index dbf655111f..c23663cd19 100644
--- a/plugins/SecureIM/src/crypt_dll.cpp
+++ b/plugins/SecureIM/src/crypt_dll.cpp
@@ -129,7 +129,7 @@ LPSTR encodeMsg(pUinKey ptr, LPARAM lParam)
LPSTR decodeMsg(pUinKey ptr, LPARAM lParam, LPSTR szEncMsg)
{
CCSDATA *pccsd = (CCSDATA *)lParam;
- PROTORECVEVENT *ppre = (PROTORECVEVENT *)pccsd->lParam;
+ auto *dbei = (DB::EventInfo *)pccsd->lParam;
LPSTR szNewMsg = nullptr;
LPSTR szOldMsg = cpp_decodeU(ptr->cntx, szEncMsg);
@@ -155,7 +155,7 @@ LPSTR decodeMsg(pUinKey ptr, LPARAM lParam, LPSTR szEncMsg)
szNewMsg = (LPSTR)mir_alloc(olen);
memcpy(szNewMsg, szOldMsg, olen);
}
- ppre->szMessage = szNewMsg;
+ dbei->pBlob = szNewMsg;
return szNewMsg;
}
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp
index d1079c8276..98ae3ae07d 100644
--- a/plugins/SecureIM/src/svcs_proto.cpp
+++ b/plugins/SecureIM/src/svcs_proto.cpp
@@ -66,13 +66,13 @@ LPSTR szUnrtfMsg = nullptr;
INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA *)lParam;
- PROTORECVEVENT *ppre = (PROTORECVEVENT *)ccs->lParam;
+ auto *dbei = (DB::EventInfo *)ccs->lParam;
pUinKey ptr = getUinKey(ccs->hContact);
- LPSTR szEncMsg = ppre->szMessage, szPlainMsg = nullptr;
+ LPSTR szEncMsg = dbei->pBlob, szPlainMsg = nullptr;
Sent_NetLog("onRecvMsg: %s", szEncMsg);
- int ssig = getSecureSig(ppre->szMessage, &szEncMsg);
+ int ssig = getSecureSig(dbei->pBlob, &szEncMsg);
bool bSecured = (isContactSecured(ccs->hContact)&SECURED) != 0;
bool bPGP = isContactPGP(ccs->hContact);
bool bGPG = isContactGPG(ccs->hContact);
@@ -96,7 +96,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
Sent_NetLog("onRecvMsg: non-secure message");
ptrA szPlainMsg(m_aastrcat(Translate("SecureIM received unencrypted message:\n"), szEncMsg));
- ppre->szMessage = szPlainMsg;
+ dbei->pBlob = szPlainMsg;
ccs->wParam |= PREF_SIMNOMETA;
return Proto_ChainRecv(wParam, ccs);
}
@@ -131,7 +131,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
mir_strcpy(tmp, ptr->msgSplitted);
mir_strcat(tmp, szEncMsg);
mir_free(ptr->msgSplitted);
- ptr->msgSplitted = szEncMsg = ppre->szMessage = tmp;
+ ptr->msgSplitted = szEncMsg = dbei->pBlob = tmp;
ssig = getSecureSig(tmp, &szEncMsg);
}
else SAFE_FREE(ptr->msgSplitted);
@@ -140,7 +140,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (ssig == SiG_SECP || ssig == SiG_PART) {
LPSTR msg = combineMessage(ptr, szEncMsg);
if (!msg) return 1;
- szEncMsg = ppre->szMessage = msg;
+ szEncMsg = dbei->pBlob = msg;
ssig = getSecureSig(msg, &szEncMsg);
}
@@ -148,7 +148,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (ssig == SiG_PGPM && ((bPGPloaded && (bPGPkeyrings || bPGPprivkey)) || (bGPGloaded && bGPGkeyrings))) {
Sent_NetLog("onRecvMsg: PGP/GPG message");
- szEncMsg = ppre->szMessage;
+ szEncMsg = dbei->pBlob;
if (!ptr->cntx) {
ptr->cntx = cpp_create_context(((bGPGloaded && bGPGkeyrings) ? CPP_MODE_GPG : CPP_MODE_PGP) | ((db_get_b(ccs->hContact, MODULENAME, "gpgANSI", 0)) ? CPP_MODE_GPG_ANSI : 0));
ptr->keyLoaded = 0;
@@ -169,7 +169,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (!szOldMsg) { // error while decrypting message, send error
SAFE_FREE(ptr->msgSplitted);
- ppre->szMessage = Translate("SecureIM: Sorry, unable to decrypt this message because you have no PGP/GPG installed. Visit www.pgp.com or www.gnupg.org for more info.");
+ dbei->pBlob = Translate("SecureIM: Sorry, unable to decrypt this message because you have no PGP/GPG installed. Visit www.pgp.com or www.gnupg.org for more info.");
return Proto_ChainRecv(wParam, ccs);
}
@@ -178,9 +178,9 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
szNewMsg = m_ustrcat(Translate("SecureIM received encrypted message:\n"), szOldMsg);
szOldMsg = szNewMsg;
}
- ptrA szMsgUtf(utf8_to_miranda(szOldMsg, ppre->flags));
- ccs->wParam = ppre->flags;
- ppre->szMessage = szMsgUtf;
+ ptrA szMsgUtf(utf8_to_miranda(szOldMsg, dbei->flags));
+ ccs->wParam = dbei->flags;
+ dbei->pBlob = szMsgUtf;
// show decoded message
showPopupRM(ptr->hContact);
@@ -213,9 +213,9 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (!szOldMsg)
return 1; // don't display it ...
- ptrA szNewMsg(utf8_to_miranda(szOldMsg, ppre->flags));
- ccs->wParam = ppre->flags;
- ppre->szMessage = szNewMsg;
+ ptrA szNewMsg(utf8_to_miranda(szOldMsg, dbei->flags));
+ ccs->wParam = dbei->flags;
+ dbei->pBlob = szNewMsg;
// show decoded message
showPopupRM(ptr->hContact);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index f4bf62111c..172bb9fef5 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -849,7 +849,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *)
int flags = 0;
if (pf2.wEffects & PFE_RTLPARA)
if (Utils_IsRtl(decoded))
- flags |= PREF_RTL;
+ flags |= DBEF_RTL;
SendMessage(hwndEdit, WM_SETREDRAW, TRUE, 0);
SendMessage(hwndEdit, EM_SETSEL, -1, -1);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 824cbe3017..e009e98496 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -471,7 +471,7 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam)
cc->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1);
}
- if (job.dwFlags & PREF_RTL)
+ if (job.dwFlags & DBEF_RTL)
dbei.flags |= DBEF_RTL;
dbei.pBlob = job.szSendBuffer;
dbei.szId = (char *)ack->lParam;
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index c37c19bb68..d6b202b529 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -84,6 +84,7 @@ const
var
ccs:PCCSDATA;
ccdata:TCCSDATA;
+ dbei:PDBEVENTINFO;
s:pWideChar;
buf:PWideChar;
data:PByte;
@@ -102,12 +103,11 @@ begin
result:=0;
mGetMem(buf,bufsize);
- isNewRequest:=StrCmp(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a,
- wpRequestNew,Length(wpRequestNew))=0;
+ dbei:=PDBEVENTINFO(ccs^.lParam);
+ isNewRequest:=StrCmp(PAnsiChar(dbei.pBlob),wpRequestNew,Length(wpRequestNew))=0;
if isNewRequest or
- (StrCmp(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a,
- wpRequest,Length(wpRequest))=0) then
+ (StrCmp(PAnsiChar(dbei.pBlob),wpRequest,Length(wpRequest))=0) then
begin
StrCopy(PAnsiChar(buf),Proto_GetBaseAccountName(ccs^.hContact));
i:=DBReadWord(ccs^.hContact,PAnsiChar(buf),'ApparentMode');
@@ -120,8 +120,7 @@ begin
// or (NotListedAllow and (DBReadByte(ccs^.hContact,strCList,'NotOnList',0))
begin
if (HistMask and hmInRequest)<>0 then
- AddEvent(ccs^.hContact,EVENTTYPE_WAT_REQUEST,DBEF_READ,nil,0,
- PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
+ AddEvent(ccs^.hContact,EVENTTYPE_WAT_REQUEST,DBEF_READ,nil,0,dbei.Timestamp);
if GetContactStatus(ccs^.hContact)<>ID_STATUS_OFFLINE then
begin
//!! Request Answer
@@ -204,8 +203,7 @@ begin
else
begin
if (HistMask and hmIRequest)<>0 then
- AddEvent(ccs^.hContact,EVENTTYPE_WAT_REQUEST,DBEF_READ,nil,0,
- PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
+ AddEvent(ccs^.hContact,EVENTTYPE_WAT_REQUEST,DBEF_READ,nil,0,dbei.Timestamp);
if (HistMask and hmISend)<>0 then
begin
//!! Request Error Answer
@@ -224,16 +222,15 @@ begin
Proto_ChainSend(0, @ccdata);
if (HistMask and hmOutError)<>0 then
begin
- AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_SENT,nil,0,
- PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
+ AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_SENT,nil,0,dbei.Timestamp);
end;
end;
end;
end
- else if StrCmp(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a,wpAnswer,Length(wpAnswer))=0 then
+ else if StrCmp(PAnsiChar(dbei.pBlob),wpAnswer,Length(wpAnswer))=0 then
begin
// decode
- data:=mir_base64_decode(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a+Length(wpAnswer),dataSize);
+ data:=mir_base64_decode(PAnsiChar(dbei.pBlob)+Length(wpAnswer),dataSize);
curpos:=pWideChar(data); // pos_artist:=curpos;
while curpos^<>#0 do inc(curpos); inc(curpos); // pos_title :=curpos;
@@ -242,9 +239,7 @@ begin
pos_template:=curpos;
if (HistMask and hmInInfo)<>0 then
- AddEvent(ccs^.hContact,EVENTTYPE_WAT_ANSWER,DBEF_READ,
- data,dataSize,
- PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
+ AddEvent(ccs^.hContact,EVENTTYPE_WAT_ANSWER,DBEF_READ,data,dataSize,dbei.Timestamp);
// Action
StrCopyW(buf,TranslateW('Music Info from '));
@@ -254,12 +249,11 @@ begin
mFreeMem(data);
end
- else if StrCmp(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a,wpError,Length(wpError))=0 then
+ else if StrCmp(PAnsiChar(dbei.pBlob),wpError,Length(wpError))=0 then
begin
if (HistMask and hmInError)<>0 then
- AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_READ,nil,0,
- PPROTORECVEVENT(ccs^.lParam)^.Timestamp);
- MessageBoxA(0,Translate(PPROTORECVEVENT(ccs^.lParam)^.szMessage.a+Length(wpError)),
+ AddEvent(ccs^.hContact,EVENTTYPE_WAT_ERROR,DBEF_READ,nil,0,dbei.Timestamp);
+ MessageBoxA(0,Translate(PAnsiChar(dbei.pBlob)+Length(wpError)),
Translate('You Get Error'),MB_ICONERROR);
end
else