summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-14 20:15:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-14 20:15:15 +0000
commit91867c03b57bbf85eae500475683c16da4ec3a9c (patch)
tree0b9bb5817ca3b6690a5debffc170ca68469c20f5 /protocols/VKontakte/src/vk_chats.cpp
parent2a984f7b7b1fc33af714c3346badd0df6ca459bc (diff)
VK: warning level 4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 457f475218..cfeb76894f 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -229,7 +229,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
for (int j = 0; j < cc->m_msgs.getCount(); j++) {
CVkChatMessage &p = cc->m_msgs[j];
- AppendChatMessage(cc, p.m_mid, p.m_uid, p.m_date, p.m_tszBody, p.m_bHistory);
+ AppendChatMessage(cc, p.m_uid, p.m_date, p.m_tszBody, p.m_bHistory);
}
cc->m_msgs.destroy();
}
@@ -244,7 +244,6 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
return;
int mid = json_as_int(json_get(pMsg, "id"));
- int isOut = json_as_int(json_get(pMsg, "out"));
int uid = json_as_int(json_get(pMsg, "user_id"));
int msgTime = json_as_int(json_get(pMsg, "date"));
@@ -258,7 +257,7 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
tszBody = mir_tstrdup(CMString(tszBody) + GetAttachmentDescr(pAttachments));
if (cc->m_bHistoryRead)
- AppendChatMessage(cc, mid, uid, msgTime, tszBody, bIsHistory);
+ AppendChatMessage(cc, uid, msgTime, tszBody, bIsHistory);
else {
CVkChatMessage *cm = cc->m_msgs.find((CVkChatMessage *)&mid);
if (cm == NULL)
@@ -271,7 +270,7 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
}
}
-void CVkProto::AppendChatMessage(CVkChatInfo *cc, int mid, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory)
+void CVkProto::AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory)
{
debugLogA("CVkProto::AppendChatMessage2");
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&uid);
@@ -387,7 +386,7 @@ void CVkProto::OnSendChatMsg(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
debugLogA("CVkProto::OnSendChatMsg %d", reply->resultCode);
if (reply->resultCode == 200) {
JSONROOT pRoot;
- JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
+ CheckJsonResponse(pReq, reply, pRoot);
}
}
@@ -559,7 +558,6 @@ void CVkProto::KickFromChat(int chat_id, int user_id, JSONNODE* pMsg)
debugLogA("CVkProto::KickFromChat (%d)", user_id);
MCONTACT chatContact = FindChat(chat_id);
- bool off = false;
if (chatContact)
if (getBool(chatContact, "off", false))
return;
@@ -580,8 +578,7 @@ void CVkProto::KickFromChat(int chat_id, int user_id, JSONNODE* pMsg)
else
msg += TranslateT("(Unknown contact)");
}
- else
- AppendChatMessage(chat_id, pMsg, false);
+ else AppendChatMessage(chat_id, pMsg, false);
MsgPopup(hContact, msg, TranslateT("Chat"));
setByte(cc->m_hContact, "kicked", 1);