diff options
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/MraAvatars.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraFilesQueue.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraMPop.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraPopUp.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraRTFMsg.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraSelectEMail.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraSendCommand.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_menus.cpp | 7 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 22 |
9 files changed, 24 insertions, 25 deletions
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index a61094c670..d28e9e6ff1 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -275,7 +275,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter) }
else {
dwErrorCode = GetLastError();
- mir_snwprintf(szErrorText, TranslateT("Avatars: can't open file %s, error"), wszFileName);
+ mir_snwprintf(szErrorText, TranslateT("Avatars: can't open file %s, error"), wszFileName.c_str());
ShowFormattedErrorMessage(szErrorText, dwErrorCode);
}
}
diff --git a/protocols/MRA/src/MraFilesQueue.cpp b/protocols/MRA/src/MraFilesQueue.cpp index edf341a755..e540e98d94 100644 --- a/protocols/MRA/src/MraFilesQueue.cpp +++ b/protocols/MRA/src/MraFilesQueue.cpp @@ -400,7 +400,7 @@ bool CMraProto::MraFilesQueueHandCheck(HNETLIBCONN hConnection, MRA_FILES_QUEUE_ dwBuffSize = Netlib_Recv(hConnection, (LPSTR)btBuff, sizeof(btBuff), 0);
if ((szEmail.GetLength() + sizeof(MRA_FT_HELLO)+1) == dwBuffSize) {
// email received
- mir_snprintf(((LPSTR)btBuff + dwBuffSize), (_countof(btBuff) - dwBuffSize), "%s %s", MRA_FT_HELLO, szEmail);
+ mir_snprintf(((LPSTR)btBuff + dwBuffSize), (_countof(btBuff) - dwBuffSize), "%s %s", MRA_FT_HELLO, szEmail.c_str());
if (!_memicmp(btBuff, btBuff + dwBuffSize, dwBuffSize))
return true;
}
@@ -411,7 +411,7 @@ bool CMraProto::MraFilesQueueHandCheck(HNETLIBCONN hConnection, MRA_FILES_QUEUE_ if ((szEmail.GetLength() + sizeof(MRA_FT_HELLO)+1) == dwBuffSize) {
// email received
ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0);
- mir_snprintf(((LPSTR)btBuff + dwBuffSize), (_countof(btBuff) - dwBuffSize), "%s %s", MRA_FT_HELLO, szEmail);
+ mir_snprintf(((LPSTR)btBuff + dwBuffSize), (_countof(btBuff) - dwBuffSize), "%s %s", MRA_FT_HELLO, szEmail.c_str());
if (!_memicmp(btBuff, btBuff + dwBuffSize, dwBuffSize)) {
// email verified
dwBuffSize = (mir_snprintf((LPSTR)btBuff, _countof(btBuff), "%s %s", MRA_FT_HELLO, szEmailMy.c_str()) + 1);
diff --git a/protocols/MRA/src/MraMPop.cpp b/protocols/MRA/src/MraMPop.cpp index 74632cdf5e..d29bd859ae 100644 --- a/protocols/MRA/src/MraMPop.cpp +++ b/protocols/MRA/src/MraMPop.cpp @@ -125,9 +125,9 @@ void CMraProto::MraMPopSessionQueueStart(HANDLE hQueue) if (mraGetStringA(NULL, "e-mail", szEmail)) {
pmpsqMPopSessionQueue->bKeyValid = false;
szEmail.MakeLower();
- szUrl.Format(MRA_MPOP_AUTH_URL, szEmail, pmpsqMPopSessionQueue->lpszMPOPKey, pmpsqi->lpszUrl);
+ szUrl.Format(MRA_MPOP_AUTH_URL, szEmail.c_str(), pmpsqMPopSessionQueue->lpszMPOPKey, pmpsqi->lpszUrl);
Utils_OpenUrl(szUrl);
- debugLogA("Opening URL: %s\n", szUrl);
+ debugLogA("Opening URL: %s\n", szUrl.c_str());
}
mir_free(pmpsqi);
}
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp index 8f4218176f..5bb872dd86 100644 --- a/protocols/MRA/src/MraPopUp.cpp +++ b/protocols/MRA/src/MraPopUp.cpp @@ -202,9 +202,9 @@ void CMraProto::MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, DWORD mraGetStringW(hContact, "Nick", szNick);
mraGetStringW(hContact, "e-mail", szEmail);
if (hContact)
- mir_snwprintf(szTitle, _countof(szTitle), L"%s <%s>", szNick, szEmail);
+ mir_snwprintf(szTitle, L"%s <%s>", szNick.c_str(), szEmail.c_str());
else
- mir_snwprintf(szTitle, _countof(szTitle), L"%s: %s <%s>", m_tszUserName, szNick, szEmail);
+ mir_snwprintf(szTitle, L"%s: %s <%s>", m_tszUserName, szNick.c_str(), szEmail.c_str());
MraPopupShowW(hContact, dwType, dwFlags, szTitle, lpszMessage);
}
diff --git a/protocols/MRA/src/MraRTFMsg.cpp b/protocols/MRA/src/MraRTFMsg.cpp index 1f735924d2..f12c479fee 100644 --- a/protocols/MRA/src/MraRTFMsg.cpp +++ b/protocols/MRA/src/MraRTFMsg.cpp @@ -235,7 +235,7 @@ DWORD CMraProto::MraConvertToRTFW(const CMStringW &wszMessage, CMStringA &szMess memcpy(lpszMessageRTFCur, PAR, sizeof(PAR)); lpszMessageRTFCur += (sizeof(PAR) - 1);
memcpy(lpszMessageRTFCur, CRLF, sizeof(CRLF)); lpszMessageRTFCur += (sizeof(CRLF) - 1);
memcpy(lpszMessageRTFCur, "}", 2); lpszMessageRTFCur += 2;
- debugLogA("%s\n", szMessageRTF);
+ debugLogA("%s\n", szMessageRTF.c_str());
return NO_ERROR;
}
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp index 0ad7606a15..096da605d9 100644 --- a/protocols/MRA/src/MraSelectEMail.cpp +++ b/protocols/MRA/src/MraSelectEMail.cpp @@ -103,7 +103,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg, UINT message, WPARAM wParam case MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD:
{
CMStringA szUrl;
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(dat->hContact, 0)), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(dat->hContact, 0)), szEmail.c_str());
dat->ppro->MraMPopSessionQueueAddUrl(dat->ppro->hMPopSessionQueue, szUrl);
}
break;
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 7fdbfb361f..1ecf581750 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -73,7 +73,7 @@ public: DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &lpwszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize)
{
- debugLogA("Sending message: flags %08x, to '%S', message '%S'\n", dwFlags, szEmail, lpwszMessage);
+ debugLogA("Sending message: flags %08x, to '%S', message '%S'\n", dwFlags, szEmail.c_str(), lpwszMessage.c_str());
DWORD dwRet = 0;
LPSTR lpszMessageConverted = (LPSTR)lpwszMessage.GetString();
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index e31dc66345..957318c000 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -111,11 +111,10 @@ INT_PTR CMraProto::MraSendEmail(WPARAM wParam, LPARAM) DWORD dwContactEMailCount = GetContactEMailCount(wParam, FALSE);
if (dwContactEMailCount) {
if (dwContactEMailCount == 1) {
- CMStringA szUrl, szEmail;
+ CMStringA szEmail;
if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
- szUrl.Format("https://e.mail.ru/cgi-bin/sentmsg?To=%s", szEmail);
- MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
+ MraMPopSessionQueueAddUrl(hMPopSessionQueue, "https://e.mail.ru/cgi-bin/sentmsg?To=" + szEmail);
}
}
else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD);
@@ -131,7 +130,7 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM) CMStringA szUrl, szEmail;
if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(wParam, 0)), szEmail);
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(wParam, 0)), szEmail.c_str());
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 99c2f70294..83b69b6b9a 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -367,7 +367,7 @@ bool CMraProto::CmdHelloAck(BinBuffer &buf) if (!mraGetStringA(NULL, "MirVerCustom", szUserAgentFormatted))
szUserAgentFormatted.Format(
"client=\"magent\" name=\"Miranda NG\" title=\"%s\" version=\"777.%lu.%lu.%lu\" build=\"%lu\" protocol=\"%lu.%lu\"",
- szSelfVersionString, __FILEVERSION_STRING, PROTO_VERSION_MAJOR, PROTO_VERSION_MINOR);
+ szSelfVersionString.c_str(), __FILEVERSION_STRING, PROTO_VERSION_MAJOR, PROTO_VERSION_MINOR);
DWORD dwFutureFlags = (getByte("RTFReceiveEnable", MRA_DEFAULT_RTF_RECEIVE_ENABLE) ? FEATURE_FLAG_RTF_MESSAGE : 0) | MRA_FEATURE_FLAGS;
@@ -699,7 +699,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) if (dwTemp == ID_STATUS_OFFLINE) { // was/now invisible
CMStringW wszEmail, wszBuff;
mraGetStringW(hContact, "e-mail", wszEmail);
- wszBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), wszEmail, TranslateT("invisible status changed"));
+ wszBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), wszEmail.c_str(), TranslateT("invisible status changed"));
MraPopupShowFromContactW(hContact, MRA_POPUP_TYPE_INFORMATION, 0, wszBuff);
MraSetContactStatus(hContact, ID_STATUS_INVISIBLE);
@@ -799,7 +799,7 @@ bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf) // read headers name
for (DWORD i = 0; i < dwFieldsNum; i++) {
buf >> pmralpsFields[i];
- debugLogA("%s ", pmralpsFields[i]);
+ debugLogA(pmralpsFields[i] + " ");
}
while (!buf.eof()) {
@@ -923,7 +923,7 @@ bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf) }
else {// for DEBUG ONLY
buf >> val;
- debugLogA("%s = %s\n", fld, val);
+ debugLogA("%s = %s\n", fld.c_str(), val.c_str());
}
} /* for */
// для авторизованного нам и так присылают правильный статус
@@ -1065,7 +1065,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) int iGroupMode = getByte("GroupMode", 100);
- debugLogA("Groups: %s\n", szGroupMask);
+ debugLogA("Groups: %s\n", szGroupMask.c_str());
DWORD dwID = 0;
for (DWORD i = 0; i < dwGroupsCount; i++) { //groups handle
DWORD dwControlParam = 0, dwGroupFlags = 0;
@@ -1096,7 +1096,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) Clist_GroupCreate(0, wszGroupName);
}
- debugLogW(L"'%s', flags: %lu (", wszGroupName, dwGroupFlags);
+ debugLogW(L"'%s', flags: %lu (", wszGroupName.c_str(), dwGroupFlags);
if (dwGroupFlags & CONTACT_FLAG_REMOVED) debugLogA("CONTACT_FLAG_REMOVED, ");
if (dwGroupFlags & CONTACT_FLAG_GROUP) debugLogA("CONTACT_FLAG_GROUP, ");
if (dwGroupFlags & CONTACT_FLAG_INVISIBLE) debugLogA("CONTACT_FLAG_INVISIBLE, ");
@@ -1112,7 +1112,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) dwID++;
}
- debugLogA("Contacts: %s\n", szContactMask);
+ debugLogA("Contacts: %s\n", szContactMask.c_str());
dwID = 20;
while (!buf.eof()) {
DWORD dwControlParam = 0;
@@ -1206,7 +1206,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) if (fieldType == 's') {
buf >> szString;
if (szString.GetLength()) {
- debugLogA("%s ", szString);
+ debugLogA(szString + " ");
}
}
else if (fieldType == 'u') {
@@ -1218,7 +1218,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) }
}
- debugLogA("ID: %lu, Group id: %lu, %s: flags: %lu (", dwID, dwGroupID, szEmail, dwContactFlag);
+ debugLogA("ID: %lu, Group id: %lu, %s: flags: %lu (", dwID, dwGroupID, szEmail.c_str(), dwContactFlag);
if (dwContactFlag & CONTACT_FLAG_REMOVED) debugLogA("CONTACT_FLAG_REMOVED, ");
if (dwContactFlag & CONTACT_FLAG_GROUP) debugLogA("CONTACT_FLAG_GROUP, ");
if (dwContactFlag & CONTACT_FLAG_INVISIBLE) debugLogA("CONTACT_FLAG_INVISIBLE, ");
@@ -1661,12 +1661,12 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA & CMStringA szText;
if (dwFlags & MESSAGE_SMS_DELIVERY_REPORT) {
szText.Format("<sms_delivery_receipt><message_id>%s-1-1955988055-%s</message_id><destination>%s</destination><delivered>No</delivered><submition_time>%s</submition_time><error_code>0</error_code><error><id>15</id><params><param>%s</param></params></error></sms_delivery_receipt>",
- szEmail, szPhone, szPhone, szTime, lpszMessageUTF);
+ szEmail.c_str(), szPhone.c_str(), szPhone.c_str(), szTime.c_str(), lpszMessageUTF);
ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_FAILED, 0, (LPARAM)szText.GetString());
}
else { // new sms
szText.Format("<sms_message><source>Mail.ru</source><destination_UIN>%s</destination_UIN><sender>%s</sender><senders_network>Mail.ru</senders_network><text>%s</text><time>%s</time></sms_message>",
- szEmail, szPhone, lpszMessageUTF, szTime);
+ szEmail.c_str(), szPhone.c_str(), lpszMessageUTF, szTime.c_str());
ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SUCCESS, 0, (LPARAM)szText.GetString());
}
}
|