diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-21 13:30:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-21 13:30:53 +0300 |
commit | 206f15f700b31dc45c2ad6b7c1ec21142d6a38a5 (patch) | |
tree | 035f7a89aeeb3cf07c9d45e495a5ec9fbf3b1d41 /protocols | |
parent | b6330f119c9f253d470dac46b20335811a8e0676 (diff) |
warning fix
Diffstat (limited to 'protocols')
24 files changed, 108 insertions, 109 deletions
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 3ac25b5256..0d4f47f31b 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -197,7 +197,7 @@ void fill_session_url(CMStringA &buf, CMStringA &token, CMStringA &secret, time_ */
CMStringA query_string;
- query_string.Format("a=%s&distId=%s&f=xml&k=%s&ts=%llu&useTLS=%d", token, AIM_DEFAULT_DISTID, AIM_DEFAULT_CLIENT_KEY, hosttime, (int)encryption);
+ query_string.Format("a=%s&distId=%s&f=xml&k=%s&ts=%llu&useTLS=%d", token.c_str(), AIM_DEFAULT_DISTID, AIM_DEFAULT_CLIENT_KEY, hosttime, (int)encryption);
BYTE session_key[MIR_SHA256_HASH_SIZE], signature[MIR_SHA256_HASH_SIZE];
mir_hmac_sha256(session_key, (BYTE*)password, mir_strlen(password), (BYTE*)secret.GetString(), secret.GetLength());
@@ -207,7 +207,7 @@ void fill_session_url(CMStringA &buf, CMStringA &token, CMStringA &secret, time_ generate_signature(signature, "GET", AIM_SESSION_URL, query_string, szKey);
ptrA szEncoded(mir_base64_encode(signature, sizeof(signature)));
- buf.Format("%s?%s&sig_sha256=%s", AIM_SESSION_URL, query_string, (char*)szEncoded);
+ buf.Format("%s?%s&sig_sha256=%s", AIM_SESSION_URL, query_string.c_str(), (char*)szEncoded);
}
bool parse_start_socar_session_response(const char *response, CMStringA &bos_host, unsigned short &bos_port, CMStringA &cookie, CMStringA &tls_cert_name, bool encryption = true)
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index bd21fbd48a..2c8deddc32 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -237,7 +237,7 @@ CMStringW PrepareMessageText(const JSONNode &pRoot) bDelimiterAdded = true; wszText.Append(L"\n-----------------"); } - wszText.AppendFormat(L"\n%s: %s", TranslateT("Attachment"), wszUrl); + wszText.AppendFormat(L"\n%s: %s", TranslateT("Attachment"), wszUrl.c_str()); } } @@ -248,19 +248,19 @@ CMStringW PrepareMessageText(const JSONNode &pRoot) wszText.Append(L"\n-----------------"); CMStringW str = p["url"].as_mstring(); - wszText.AppendFormat(L"\n%s: %s", TranslateT("Embed"), str); + wszText.AppendFormat(L"\n%s: %s", TranslateT("Embed"), str.c_str()); str = p["provider"]["name"].as_mstring() + L" " + p["type"].as_mstring(); if (str.GetLength() > 1) - wszText.AppendFormat(L"\n\t%s", str); + wszText.AppendFormat(L"\n\t%s", str.c_str()); str = p["description"].as_mstring(); if (!str.IsEmpty()) - wszText.AppendFormat(L"\n\t%s", str); + wszText.AppendFormat(L"\n\t%s", str.c_str()); str = p["thumbnail"]["url"].as_mstring(); if (!str.IsEmpty()) - wszText.AppendFormat(L"\n%s: %s", TranslateT("Preview"), str); + wszText.AppendFormat(L"\n%s: %s", TranslateT("Preview"), str.c_str()); } return wszText; diff --git a/protocols/FacebookRM/src/http_request.h b/protocols/FacebookRM/src/http_request.h index 9e3a578f56..3b8b679bd4 100644 --- a/protocols/FacebookRM/src/http_request.h +++ b/protocols/FacebookRM/src/http_request.h @@ -209,7 +209,7 @@ protected: HttpRequestBody & operator<<(const FORMAT_VALUE ¶m) { AppendSeparator(); - content.AppendFormat("%s=%s", param.szName, param.szValue); + content.AppendFormat("%s=%s", param.szName, param.szValue.c_str()); return *this; } diff --git a/protocols/FacebookRM/src/requests/history.h b/protocols/FacebookRM/src/requests/history.h index faa146934e..2d8d58b1ea 100644 --- a/protocols/FacebookRM/src/requests/history.h +++ b/protocols/FacebookRM/src/requests/history.h @@ -52,9 +52,9 @@ public: CMStringA begin(::FORMAT, "messages[%s][%s]", type, idEncoded); Body - << CMStringA(::FORMAT, "%s[offset]=%i", begin, offset).c_str() - << CMStringA(::FORMAT, "%s[timestamp]=%s", begin, timestamp).c_str() - << CMStringA(::FORMAT, "%s[limit]=%i", begin, limit).c_str(); + << CMStringA(::FORMAT, "%s[offset]=%i", begin.c_str(), offset).c_str() + << CMStringA(::FORMAT, "%s[timestamp]=%s", begin.c_str(), timestamp).c_str() + << CMStringA(::FORMAT, "%s[limit]=%i", begin.c_str(), limit).c_str(); //} /*if (loadThreadInfo) { @@ -106,9 +106,9 @@ public: CMStringA begin(::FORMAT, "messages[%s][%s]", type, idEncoded); Body - << CMStringA(::FORMAT, "%s[offset]=%i", begin, 0).c_str() - << CMStringA(::FORMAT, "%s[timestamp]=%s", begin, "").c_str() - << CMStringA(::FORMAT, "%s[limit]=%i", begin, limit).c_str(); + << CMStringA(::FORMAT, "%s[offset]=%i", begin.c_str(), 0).c_str() + << CMStringA(::FORMAT, "%s[timestamp]=%s", begin.c_str(), "").c_str() + << CMStringA(::FORMAT, "%s[limit]=%i", begin.c_str(), limit).c_str(); // Load thread info Body << CMStringA(::FORMAT, "threads[%s][0]=%s", type, idEncoded).c_str(); @@ -133,9 +133,9 @@ public: // Load messages CMStringA begin(::FORMAT, "messages[%s][%s]", "thread_fbids", idEncoded); Body - << CMStringA(::FORMAT, "%s[offset]=%i", begin, offset).c_str() - //<< CMStringA(::FORMAT, "%s[timestamp]=%s", begin, "").c_str() - << CMStringA(::FORMAT, "%s[limit]=%i", begin, limit).c_str(); + << CMStringA(::FORMAT, "%s[offset]=%i", begin.c_str(), offset).c_str() + //<< CMStringA(::FORMAT, "%s[timestamp]=%s", begin.c_str(), "").c_str() + << CMStringA(::FORMAT, "%s[limit]=%i", begin.c_str(), limit).c_str(); // Load thread info Body << CMStringA(::FORMAT, "threads[%s][%i]=%s", "thread_fbids", i, idEncoded).c_str(); diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 7c460538c1..caba9c709f 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -52,10 +52,10 @@ VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) return;
if (ppro->m_forceVisible)
- ppro->PostIrcMessage(L"/MODE %s -i", ppro->m_info.sNick);
+ ppro->PostIrcMessage(L"/MODE %s -i", ppro->m_info.sNick.c_str());
if (mir_strlen(ppro->m_myHost) == 0 && ppro->IsConnected())
- ppro->DoUserhostWithReason(2, (L"S" + ppro->m_info.sNick), true, L"%s", ppro->m_info.sNick);
+ ppro->DoUserhostWithReason(2, (L"S" + ppro->m_info.sNick), true, L"%s", ppro->m_info.sNick.c_str());
}
VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
@@ -71,7 +71,7 @@ VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) wchar_t temp2[270];
if (!ppro->m_info.sServerName.IsEmpty())
- mir_snwprintf(temp2, L"PING %s", ppro->m_info.sServerName);
+ mir_snwprintf(temp2, L"PING %s", ppro->m_info.sServerName.c_str());
else
mir_snwprintf(temp2, L"PING %u", time(0));
@@ -114,7 +114,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) }
name = GetWord(ppro->m_channelsToWho, 0);
- ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name);
+ ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str());
CMStringW temp = GetWordAddress(ppro->m_channelsToWho, 1);
ppro->m_channelsToWho = temp;
if (ppro->m_iTempCheckTime)
@@ -191,7 +191,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) name2 = GetWord(ppro->m_namesToUserhost, 0);
CMStringW temp;
if (!name.IsEmpty()) {
- ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name);
+ ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str());
temp = GetWordAddress(ppro->m_namesToWho, 1);
ppro->m_namesToWho = temp;
}
@@ -261,7 +261,7 @@ void __cdecl CIrcProto::ResolveIPThread(void *di) bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg)
{
wchar_t szResponse[100];
- mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0]);
+ mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
SendIrcMessage(szResponse);
return false;
}
@@ -410,9 +410,9 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) if (m_rejoinIfKicked) {
CHANNELINFO *wi = (CHANNELINFO *)Chat_GetUserInfo(m_szModuleName, MakeWndID(pmsg->parameters[0]));
if (wi && wi->pszPassword)
- PostIrcMessage(L"/JOIN %s %s", pmsg->parameters[0], wi->pszPassword);
+ PostIrcMessage(L"/JOIN %s %s", pmsg->parameters[0].c_str(), wi->pszPassword);
else
- PostIrcMessage(L"/JOIN %s", pmsg->parameters[0]);
+ PostIrcMessage(L"/JOIN %s", pmsg->parameters[0].c_str());
}
}
@@ -528,8 +528,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) if (m_oldStyleModes) {
wchar_t temp[256];
- mir_snwprintf(temp, TranslateT("%s sets mode %s"),
- pmsg->prefix.sNick, pmsg->parameters[1]);
+ mir_snwprintf(temp, TranslateT("%s sets mode %s"), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str());
CMStringW sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++)
@@ -542,16 +541,16 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) sParams += L" " + pmsg->parameters[i];
wchar_t temp[4000];
- mir_snwprintf(temp, TranslateT("%s sets mode %s%s"), pmsg->prefix.sNick, sModes, sParams);
- DoEvent(GC_EVENT_INFORMATION, pmsg->parameters[0], pmsg->prefix.sNick, temp, NULL, NULL, NULL, true, false);
+ mir_snwprintf(temp, TranslateT("%s sets mode %s%s"), pmsg->prefix.sNick.c_str(), sModes.c_str(), sParams.c_str());
+ DoEvent(GC_EVENT_INFORMATION, pmsg->parameters[0].c_str(), pmsg->prefix.sNick, temp, NULL, NULL, NULL, true, false);
}
if (flag)
- PostIrcMessage(L"/MODE %s", pmsg->parameters[0]);
+ PostIrcMessage(L"/MODE %s", pmsg->parameters[0].c_str());
}
else {
wchar_t temp[256];
- mir_snwprintf(temp, TranslateT("%s sets mode %s"), pmsg->prefix.sNick, pmsg->parameters[1]);
+ mir_snwprintf(temp, TranslateT("%s sets mode %s"), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str());
CMStringW sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++)
@@ -658,7 +657,7 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) return true;
if (pmsg->m_bIncoming && m_joinOnInvite && pmsg->parameters.getCount() > 1 && mir_wstrcmpi(pmsg->parameters[0], m_info.sNick) == 0)
- PostIrcMessage(L"/JOIN %s", pmsg->parameters[1]);
+ PostIrcMessage(L"/JOIN %s", pmsg->parameters[1].c_str());
ShowMessage(pmsg);
return true;
@@ -668,7 +667,7 @@ bool CIrcProto::OnIrc_PINGPONG(const CIrcMessage* pmsg) {
if (pmsg->m_bIncoming && pmsg->sCommand == L"PING") {
wchar_t szResponse[100];
- mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0]);
+ mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
SendIrcMessage(szResponse);
}
@@ -738,8 +737,9 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // exploit???
if (mess.Find(1) != -1 || mess.Find(L"%newl") != -1) {
- wchar_t temp[4096];
- mir_snwprintf(temp, TranslateT("CTCP ERROR: Malformed CTCP command received from %s!%s@%s. Possible attempt to take control of your IRC client registered"), pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost);
+ CMStringW temp(FORMAT,
+ TranslateT("CTCP ERROR: Malformed CTCP command received from %s!%s@%s. Possible attempt to take control of your IRC client registered"),
+ pmsg->prefix.sNick.c_str(), pmsg->prefix.sUser.c_str(), pmsg->prefix.sHost.c_str());
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick, temp, NULL, NULL, NULL, true, false);
return true;
}
@@ -794,46 +794,46 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming FINGER
else if (pmsg->m_bIncoming && command == L"finger") {
- PostIrcMessage(L"/NOTICE %s \001FINGER %s (%s)\001", pmsg->prefix.sNick, m_name, m_userID);
+ PostIrcMessage(L"/NOTICE %s \001FINGER %s (%s)\001", pmsg->prefix.sNick.c_str(), m_name, m_userID);
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP FINGER requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP FINGER requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
// incoming VERSION
else if (pmsg->m_bIncoming && command == L"version") {
- PostIrcMessage(L"/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)" L", " _A2W(__COPYRIGHT) L"\001", pmsg->prefix.sNick);
+ PostIrcMessage(L"/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)" L", " _A2W(__COPYRIGHT) L"\001", pmsg->prefix.sNick.c_str());
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP VERSION requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP VERSION requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
// incoming SOURCE
else if (pmsg->m_bIncoming && command == L"source") {
- PostIrcMessage(L"/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001", pmsg->prefix.sNick);
+ PostIrcMessage(L"/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001", pmsg->prefix.sNick.c_str());
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP SOURCE requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP SOURCE requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
// incoming USERINFO
else if (pmsg->m_bIncoming && command == L"userinfo") {
- PostIrcMessage(L"/NOTICE %s \001USERINFO %s\001", pmsg->prefix.sNick, m_userInfo);
+ PostIrcMessage(L"/NOTICE %s \001USERINFO %s\001", pmsg->prefix.sNick.c_str(), m_userInfo);
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP USERINFO requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP USERINFO requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
// incoming PING
else if (pmsg->m_bIncoming && command == L"ping") {
- PostIrcMessage(L"/NOTICE %s \001%s\001", pmsg->prefix.sNick, mess);
+ PostIrcMessage(L"/NOTICE %s \001%s\001", pmsg->prefix.sNick.c_str(), mess.c_str());
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP PING requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP PING requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
@@ -842,9 +842,9 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) wchar_t temp[300];
time_t tim = time(NULL);
mir_wstrncpy(temp, _wctime(&tim), 25);
- PostIrcMessage(L"/NOTICE %s \001TIME %s\001", pmsg->prefix.sNick, temp);
+ PostIrcMessage(L"/NOTICE %s \001TIME %s\001", pmsg->prefix.sNick.c_str(), temp);
- mir_snwprintf(temp, TranslateT("CTCP TIME requested by %s"), pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP TIME requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
@@ -1012,16 +1012,16 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) ulAdr = ConvertIPToInteger(m_IPFromServer ? m_myHost : m_myLocalHost);
if (bIsChat && !m_DCCChatEnabled)
- mir_snwprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick);
+ mir_snwprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick.c_str());
else if (type == L"send" && !m_DCCFileEnabled)
- mir_snwprintf(szTemp, TranslateT("DCC: File transfer request from %s denied"), pmsg->prefix.sNick);
+ mir_snwprintf(szTemp, TranslateT("DCC: File transfer request from %s denied"), pmsg->prefix.sNick.c_str());
else if (type == L"send" && !iPort && ulAdr == 0)
- mir_snwprintf(szTemp, TranslateT("DCC: Reverse file transfer request from %s denied [No local IP]"), pmsg->prefix.sNick);
+ mir_snwprintf(szTemp, TranslateT("DCC: Reverse file transfer request from %s denied [No local IP]"), pmsg->prefix.sNick.c_str());
if (sFile.IsEmpty() || dwAdr == 0 || dwSize == 0 || iPort == 0 && sToken.IsEmpty())
- mir_snwprintf(szTemp, TranslateT("DCC ERROR: Malformed CTCP request from %s [%s]"), pmsg->prefix.sNick, mess);
+ mir_snwprintf(szTemp, TranslateT("DCC ERROR: Malformed CTCP request from %s [%s]"), pmsg->prefix.sNick.c_str(), mess.c_str());
if (szTemp[0]) {
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick, szTemp, NULL, NULL, NULL, true, false);
@@ -1040,10 +1040,10 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) szTemp[0] = '\0';
if (type == L"resume" && !m_DCCFileEnabled)
- mir_snwprintf(szTemp, TranslateT("DCC: File transfer resume request from %s denied"), pmsg->prefix.sNick);
+ mir_snwprintf(szTemp, TranslateT("DCC: File transfer resume request from %s denied"), pmsg->prefix.sNick.c_str());
if (sToken.IsEmpty() && iPort == 0 || sFile.IsEmpty())
- mir_snwprintf(szTemp, TranslateT("DCC ERROR: Malformed CTCP request from %s [%s]"), pmsg->prefix.sNick, mess);
+ mir_snwprintf(szTemp, TranslateT("DCC ERROR: Malformed CTCP request from %s [%s]"), pmsg->prefix.sNick.c_str(), mess.c_str());
if (szTemp[0]) {
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick, szTemp, NULL, NULL, NULL, true, false);
@@ -1075,7 +1075,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
else {
wchar_t szTemp[512];
- mir_snwprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick);
+ mir_snwprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick, szTemp, NULL, NULL, NULL, true, false);
}
}
@@ -1091,7 +1091,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (dcc) {
InterlockedExchange(&dcc->dwWhatNeedsDoing, (long)FILERESUME_RESUME);
dcc->dwResumePos = dwSize; // dwSize is the resume position
- PostIrcMessage(L"/PRIVMSG %s \001DCC ACCEPT %s\001", pmsg->prefix.sNick, GetWordAddress(mess, 2));
+ PostIrcMessage(L"/PRIVMSG %s \001DCC ACCEPT %s\001", pmsg->prefix.sNick.c_str(), GetWordAddress(mess, 2));
}
}
@@ -1172,7 +1172,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
else if (pmsg->m_bIncoming) {
wchar_t temp[300];
- mir_snwprintf(temp, TranslateT("CTCP %s requested by %s"), ocommand, pmsg->prefix.sNick);
+ mir_snwprintf(temp, TranslateT("CTCP %s requested by %s"), ocommand.c_str(), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
}
@@ -1217,11 +1217,11 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) //... else show the reply in the current window
if (pmsg->m_bIncoming && command == L"ping") {
int s = (int)time(0) - (int)_wtol(GetWordAddress(mess, 1));
- mir_snwprintf(szTemp, TranslateT("CTCP PING reply from %s: %u sec(s)"), pmsg->prefix.sNick, s);
+ mir_snwprintf(szTemp, TranslateT("CTCP PING reply from %s: %u sec(s)"), pmsg->prefix.sNick.c_str(), s);
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false);
}
else {
- mir_snwprintf(szTemp, TranslateT("CTCP %s reply from %s: %s"), ocommand, pmsg->prefix.sNick, GetWordAddress(mess, 1));
+ mir_snwprintf(szTemp, TranslateT("CTCP %s reply from %s: %s"), ocommand.c_str(), pmsg->prefix.sNick.c_str(), GetWordAddress(mess, 1));
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false);
}
}
@@ -1648,7 +1648,7 @@ bool CIrcProto::OnIrc_WHOIS_OTHER(const CIrcMessage* pmsg) wchar_t temp[1024], temp2[1024];
m_whoisDlg->m_InfoOther.GetText(temp, 1000);
mir_wstrcat(temp, L"%s\r\n");
- mir_snwprintf(temp2, temp, pmsg->parameters[2]);
+ mir_snwprintf(temp2, temp, pmsg->parameters[2].c_str());
m_whoisDlg->m_InfoOther.SetText(temp2);
}
ShowMessage(pmsg);
@@ -1975,7 +1975,7 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) {
CMStringW command = PeekAtReasons(2);
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 6 && command[0] == 'S') {
- m_whoReply.AppendFormat(L"%s %s %s %s ", pmsg->parameters[5], pmsg->parameters[2], pmsg->parameters[3], pmsg->parameters[6]);
+ m_whoReply.AppendFormat(L"%s %s %s %s ", pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str());
if (mir_wstrcmpi(pmsg->parameters[5], m_info.sNick) == 0) {
wchar_t host[1024];
mir_wstrncpy(host, pmsg->parameters[3], 1024);
@@ -2106,13 +2106,13 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) case 'K': // Ban & Kick
channel = (command.c_str() + 1);
- mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s", channel, host, channel, nick);
+ mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s", channel.c_str(), host.c_str(), channel.c_str(), nick.c_str());
break;
case 'L': // Ban & Kick with reason
channel = (command.c_str() + 1);
mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s %%question=\"%s\",\"%s\",\"%s\"",
- channel, host, channel, nick,
+ channel.c_str(), host.c_str(), channel.c_str(), nick.c_str(),
TranslateT("Please enter the reason"), TranslateT("Ban'n Kick"), TranslateT("Jerk"));
break;
}
@@ -2297,7 +2297,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, m_iStatus);
if (m_iDesiredStatus == ID_STATUS_AWAY)
- PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY " + m_statusMessage.Mid(0, 450));
if (m_perform) {
DoPerform("ALL NETWORKS");
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index b062662c29..de93e74c1f 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -746,7 +746,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) }
else if (iNewStatus == ID_STATUS_AWAY && IsConnected()) //go to away while connected
{
- PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450).c_str());
return 0;
}
else if (iNewStatus == ID_STATUS_ONLINE && IsConnected()) //already online
@@ -804,7 +804,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const wchar_t* msg) m_statusMessage = newStatus;
if (m_iStatus == ID_STATUS_AWAY)
- PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450).c_str());
}
}
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index 3efe9a248e..ea2fab0673 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -619,7 +619,7 @@ void CIrcProto::DoUserhostWithReason(int type, CMStringW reason, bool bSendComma }
va_list ap;
- va_start(ap, userhostparams);
+ va_start(ap, &userhostparams);
mir_vsnwprintf(temp, _countof(temp), (S + L" " + userhostparams).c_str(), ap);
va_end(ap);
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index c431395078..e5b5a5c0b2 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1263,7 +1263,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) {
if (ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID) != NULL) {
wchar_t text[1024];
- mir_snwprintf(text, L"%s/%s", gch->pDest->ptszID, szBuffer);
+ mir_snwprintf(text, L"%s/%s", gch->pDest->ptszID, szBuffer.c_str());
ppro->SendPresenceTo(ppro->m_iStatus == ID_STATUS_INVISIBLE ? ID_STATUS_ONLINE : ppro->m_iStatus, text, NULL);
}
}
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 539758a0e8..5f433b2f74 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -754,7 +754,7 @@ static VOID CALLBACK JabberGroupchatChangeNickname(void* arg) if (param->ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) {
replaceStrW(item->nick, szBuffer);
- param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMStringW(FORMAT, L"%s/%s", item->jid, szBuffer), NULL);
+ param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMStringW(FORMAT, L"%s/%s", item->jid, szBuffer.c_str()), NULL);
}
}
@@ -1151,7 +1151,7 @@ public: CSuper::OnInitDialog();
wchar_t buf[256];
- mir_snwprintf(buf, TranslateT("Group chat invitation to\n%s"), m_roomJid);
+ mir_snwprintf(buf, TranslateT("Group chat invitation to\n%s"), m_roomJid.c_str());
SetDlgItemText(m_hwnd, IDC_HEADERBAR, buf);
SetDlgItemText(m_hwnd, IDC_FROM, m_from);
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());
}
}
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index 8f0b1f064f..c73bfbc9d6 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -336,7 +336,7 @@ void CMsnProto::MSN_CreateContList(void) }
cxml.Append("</ml>");
- msnNsThread->sendPacketPayload("PUT", "MSGR\\CONTACTS", "%s", cxml);
+ msnNsThread->sendPacketPayload("PUT", "MSGR\\CONTACTS", "%s", cxml.c_str());
if (msnP24Ver > 1)
msnNsThread->sendPacketPayload("PUT", "MSGR\\SUBSCRIPTIONS", "<subscribe><presence><buddies><all /></buddies></presence><messaging><im /><conversations /></messaging><notifications><partners>%s<partner>ABCH</partner></partners></notifications></subscribe>",
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index b9fd6955cd..615524ec03 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -474,7 +474,7 @@ int ThreadData::sendMessage(int, const char *email, int netId, const char *parMs if (*tFontName) buf.AppendFormat("X-MMS-IM-Format: FN=%s; EF=%s; CO=%x; CS=0; PF=31%s\r\n",
tFontName, tFontStyle, tFontColor, (parFlags & MSG_RTL) ? ";RL=1" : "");
- buf.AppendFormat("\r\n%s", msgClean);
+ buf.AppendFormat("\r\n%s", msgClean.c_str());
if (pszNick!=proto->MyOptions.szEmail) db_free(&dbv);
parMsg = buf;
@@ -887,7 +887,7 @@ void CMsnProto::MsnInvokeMyURL(bool ismail, const char* url) CMStringA hippy(passport);
hippy.AppendFormat("/ppsecure/sha1auth.srf?lc=%d&token=%s", itoa(langpref, passport, 10), ptrA(mir_urlEncode(post)));
- debugLogA("Starting URL: '%s'", hippy);
+ debugLogA("Starting URL: '%s'", hippy.c_str());
Utils_OpenUrl(hippy.GetString());
}
}
diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h index bfc872ba68..b18d8c18b2 100644 --- a/protocols/SkypeWeb/src/http_request.h +++ b/protocols/SkypeWeb/src/http_request.h @@ -209,7 +209,7 @@ protected: HttpRequestBody & operator<<(const FORMAT_VALUE ¶m)
{
AppendSeparator();
- content.AppendFormat("%s=%s", param.szName, param.szValue);
+ content.AppendFormat("%s=%s", param.szName, param.szValue.c_str());
return *this;
}
diff --git a/protocols/SkypeWeb/src/requests/avatars.h b/protocols/SkypeWeb/src/requests/avatars.h index 0715e5c552..97b5460416 100644 --- a/protocols/SkypeWeb/src/requests/avatars.h +++ b/protocols/SkypeWeb/src/requests/avatars.h @@ -31,7 +31,7 @@ class SetAvatarRequest : public HttpRequest {
public:
SetAvatarRequest(const PBYTE data, size_t dataSize, const char *szMime, LoginInfo &li) :
- HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/profile/avatar", CMStringA(li.szSkypename.get()).MakeLower())
+ HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/profile/avatar", CMStringA(li.szSkypename.get()).MakeLower().c_str())
{
Headers
<< CHAR_VALUE("X-Skypetoken", li.api.szToken)
diff --git a/protocols/SkypeWeb/src/requests/login.h b/protocols/SkypeWeb/src/requests/login.h index 78b8cdd431..f318831721 100644 --- a/protocols/SkypeWeb/src/requests/login.h +++ b/protocols/SkypeWeb/src/requests/login.h @@ -25,7 +25,7 @@ public: HttpRequest(REQUEST_POST, "api.skype.com/login/skypetoken")
{
username.MakeLower();
- CMStringA hashStr(::FORMAT, "%s\nskyper\n%s", username, password);
+ CMStringA hashStr(::FORMAT, "%s\nskyper\n%s", username.c_str(), password);
BYTE digest[16];
mir_md5_hash((const BYTE*)hashStr.GetString(), hashStr.GetLength(), digest);
diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index 70921b62b6..459e45ebe8 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -157,31 +157,31 @@ void CSkypeProto::ProcessEndpointPresence(const JSONNode &node) {
case 0:
case 1:
- MirVer.AppendFormat("Skype (Web) %s", ParseUrl(version.c_str(), "/"));
+ MirVer.Append("Skype (Web) " + ParseUrl(version.c_str(), "/"));
break;
case 10:
- MirVer.AppendFormat("Skype (XBOX) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (XBOX) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 17:
- MirVer.AppendFormat("Skype (Android) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (Android) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 16:
- MirVer.AppendFormat("Skype (iOS) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (iOS) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 12:
- MirVer.AppendFormat("Skype (WinRT) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (WinRT) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 15:
- MirVer.AppendFormat("Skype (WP) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (WP) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 13:
- MirVer.AppendFormat("Skype (OSX) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (OSX) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 11:
- MirVer.AppendFormat("Skype (Windows) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (Windows) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 14:
- MirVer.AppendFormat("Skype (Linux) %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append("Skype (Linux) " + ParseUrl(skypeNameVersion.c_str(), "/"));
break;
case 125:
MirVer.AppendFormat("Miranda NG Skype %s", version.c_str());
|