diff options
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 8 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_avatars.cpp | 12 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_captcha.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 20 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_feed.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_files.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 8 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 40 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_search.cpp | 14 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
11 files changed, 61 insertions, 61 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 9646b486d2..f68d076c5e 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -233,7 +233,7 @@ void CVkProto::SetAllContactStatuses(int iStatus) for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
SetChatStatus(hContact, iStatus);
- else if (getWord(hContact, "Status", 0) != iStatus)
+ else if (getWord(hContact, "Status") != iStatus)
setWord(hContact, "Status", iStatus);
if (iStatus == ID_STATUS_OFFLINE) {
@@ -262,7 +262,7 @@ MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate) if (!bCreate)
return NULL;
- MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD);
Proto_AddToContact(hNewContact, m_szModuleName);
setDword(hNewContact, "ID", dwUserid);
db_set_ts(hNewContact, "CList", "Group", m_defaultGroup);
@@ -708,7 +708,7 @@ void CVkProto::ContactTypingThread(void *p) MCONTACT hContact = (MCONTACT)p;
CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
Sleep(5500);
- CallService(MS_PROTO_CONTACTISTYPING, hContact, 0);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact);
if (!ServiceExists("MessageState/DummyService")) {
Sleep(1500);
@@ -729,7 +729,7 @@ int CVkProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) void CVkProto::SetSrmmReadStatus(MCONTACT hContact)
{
- time_t time = getDword(hContact, "LastMsgReadTime", 0);
+ time_t time = getDword(hContact, "LastMsgReadTime");
if (!time)
return;
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index 85e97f9906..d7fa2e513e 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -28,14 +28,14 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest* pReq) FILE *out = _tfopen(ai.filename, _T("wb"));
if (out == NULL) {
- ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0);
+ ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai);
return;
}
fwrite(reply->pData, 1, reply->dataLength, out);
fclose(out);
setByte((MCONTACT)pReq->pUserInfo, "NeedNewAvatar", 0);
- ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0);
+ ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai);
}
INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
@@ -63,7 +63,7 @@ INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) void CVkProto::ReloadAvatarInfo(MCONTACT hContact)
{
if (!hContact) {
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName);
return;
}
PROTO_AVATAR_INFORMATION ai = { 0 };
@@ -85,7 +85,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) pai->format = ProtoGetAvatarFormat(pai->filename);
- if (::_taccess(pai->filename, 0) == 0 && !getBool(pai->hContact, "NeedNewAvatar", 0))
+ if (::_taccess(pai->filename, 0) == 0 && !getBool(pai->hContact, "NeedNewAvatar"))
return GAIR_SUCCESS;
if (IsOnline()) {
@@ -153,7 +153,7 @@ void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) if (tszUrl.IsEmpty()) {
delSetting(hContact, "AvatarUrl");
- ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL);
}
else {
setTString(hContact, "AvatarUrl", tszUrl);
@@ -162,6 +162,6 @@ void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) ai.hContact = hContact;
GetAvatarFileName(ai.hContact, ai.filename, _countof(ai.filename));
ai.format = ProtoGetAvatarFormat(ai.filename);
- ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai);
}
}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_captcha.cpp b/protocols/VKontakte/src/vk_captcha.cpp index ede03c51e2..8b98806e67 100644 --- a/protocols/VKontakte/src/vk_captcha.cpp +++ b/protocols/VKontakte/src/vk_captcha.cpp @@ -123,7 +123,7 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result) memio.iLen = reply->dataLength;
memio.pBuf = reply->pData;
memio.fif = FIF_UNKNOWN; /* detect */
- param.bmp = (HBITMAP)CallService(MS_IMG_LOADFROMMEM, (WPARAM)&memio, 0);
+ param.bmp = (HBITMAP)CallService(MS_IMG_LOADFROMMEM, (WPARAM)&memio);
BITMAP bmp = {0};
GetObject(param.bmp, sizeof(bmp), &bmp);
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index d03ca05b19..e7d94e6a75 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -36,7 +36,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) MCONTACT chatContact = FindChat(id);
if (chatContact)
- if (getBool(chatContact, "kicked", false))
+ if (getBool(chatContact, "kicked"))
return NULL;
CVkChatInfo *c = m_chats.find((CVkChatInfo*)&id);
@@ -510,7 +510,7 @@ int CVkProto::OnChatEvent(WPARAM, LPARAM lParam) db_set_dw(hContact, "Ignore", "Mask1", 0);
RetrieveUserInfo(_ttoi(gch->ptszUID));
}
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact);
}
break;
@@ -638,7 +638,7 @@ INT_PTR __cdecl CVkProto::OnJoinChat(WPARAM hContact, LPARAM) if (!IsOnline())
return 1;
- if (getBool(hContact, "kicked", false))
+ if (getBool(hContact, "kicked"))
return 1;
int chat_id = getDword(hContact, "vk_chat_id", -1);
@@ -691,7 +691,7 @@ void CVkProto::LeaveChat(int chat_id, bool close_window, bool delete_chat) gcd.iType = GC_EVENT_CONTROL;
CallServiceSync(MS_GC_EVENT, close_window? SESSION_TERMINATE:SESSION_OFFLINE, (LPARAM)&gce);
if (delete_chat)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)cc->m_hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)cc->m_hContact);
else
setByte(cc->m_hContact, "off", (int)true);
m_chats.remove(cc);
@@ -703,7 +703,7 @@ void CVkProto::KickFromChat(int chat_id, int user_id, const JSONNode &jnMsg) MCONTACT chatContact = FindChat(chat_id);
if (chatContact)
- if (getBool(chatContact, "off", false))
+ if (getBool(chatContact, "off"))
return;
if (user_id == m_myUserId)
@@ -746,7 +746,7 @@ INT_PTR __cdecl CVkProto::SvcDestroyKickChat(WPARAM hContact, LPARAM) if (!IsOnline())
return 1;
- if (!getBool(hContact, "off", false))
+ if (!getBool(hContact, "off"))
return 1;
int chat_id = getDword(hContact, "vk_chat_id", -1);
@@ -763,7 +763,7 @@ INT_PTR __cdecl CVkProto::SvcDestroyKickChat(WPARAM hContact, LPARAM) << CHAR_PARAM("code", code)
<< VER_API);
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
return 0;
}
@@ -800,7 +800,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) db_set_b(hContact, "CList", "NotOnList", 1);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
- CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact);
break;
case IDM_VISIT_PROFILE:
@@ -923,8 +923,8 @@ static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (int hItem = SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0)) {
if (SendMessage(hwndClist, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- int uid = ppro->getDword(hContact, "ID", 0);
- if (uid != NULL) {
+ int uid = ppro->getDword(hContact, "ID");
+ if (uid != 0) {
if (!uids.IsEmpty())
uids.AppendChar(',');
uids.AppendFormat("%d", uid);
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 9a4f12b219..b403a15c2e 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -24,7 +24,7 @@ void CVkProto::AddFeedSpecialUser() MCONTACT hContact = FindUser(VK_FEED_USER);
if (!bSpecialContact) {
if (hContact)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
return;
}
@@ -40,7 +40,7 @@ void CVkProto::AddFeedSpecialUser() setTString(hContact, "Homepage", _T("https://vk.com/feed"));
}
- if (getWord(hContact, "Status", 0) != ID_STATUS_ONLINE)
+ if (getWord(hContact, "Status") != ID_STATUS_ONLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
SetMirVer(hContact, 7);
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index 2331c389a1..0532276b5b 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -82,7 +82,7 @@ HANDLE CVkProto::SendFile(MCONTACT hContact, const TCHAR *desc, TCHAR **files) void CVkProto::SendFileFiled(CVkFileUploadParam *fup, TCHAR *reason)
{
debugLog(_T("CVkProto::SendFileFiled <%s> Error code <%d>"), reason, fup->iErrorCode);
- ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)fup, 0);
+ ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)fup);
CMString tszError;
switch (fup->iErrorCode) {
case VKERR_COULD_NOT_SAVE_FILE:
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index fc07790b82..3eed6635d3 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -33,7 +33,7 @@ void CVkProto::SendMsgAck(void *param) debugLogA("CVkProto::SendMsgAck");
TFakeAckParams *ack = (TFakeAckParams*)param;
Sleep(100);
- ProtoBroadcastAck(ack->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)ack->msgid, 0);
+ ProtoBroadcastAck(ack->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)ack->msgid);
delete ack;
}
@@ -98,7 +98,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) if (param->iMsgID != -1)
m_sendIds.insert((HANDLE)mid);
- if (mid > getDword(param->hContact, "lastmsgid", 0))
+ if (mid > getDword(param->hContact, "lastmsgid"))
setDword(param->hContact, "lastmsgid", mid);
if (m_iMarkMessageReadOn >= markOnReply)
MarkMessagesRead(param->hContact);
@@ -108,13 +108,13 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) if (param->iMsgID == -1) {
CVkFileUploadParam *fup = (CVkFileUploadParam *)param->iCount;
- ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, iResult, (HANDLE)fup, 0);
+ ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, iResult, (HANDLE)fup);
if (!pReq->bNeedsRestart)
delete fup;
return;
}
else if (m_bServerDelivery)
- ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, iResult, HANDLE(param->iMsgID), 0);
+ ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, iResult, HANDLE(param->iMsgID));
if (!pReq->bNeedsRestart) {
delete param;
pReq->pUserInfo = NULL;
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 8b5621fa6c..1e3e44a21a 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -121,7 +121,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L CheckDlgButton(hwndDlg, IDC_DELIVERY, ppro->m_bServerDelivery ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_USE_LOCAL_TIME, ppro->m_bUseLocalTime ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOCLEAN, ppro->getByte("AutoClean", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOCLEAN, ppro->getBool("AutoClean") ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONREAD, (ppro->m_iMarkMessageReadOn == markOnRead) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONRECEIVE, (ppro->m_iMarkMessageReadOn == markOnReceive) ? BST_CHECKED : BST_UNCHECKED);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 873badb076..5b626653f8 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -67,34 +67,34 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : m_bServerDelivery = getBool("ServerDelivery", true);
m_bHideChats = getBool("HideChats", true);
- m_bMesAsUnread = getBool("MesAsUnread", false);
- m_bUseLocalTime = getBool("UseLocalTime", false);
- m_bReportAbuse = getBool("ReportAbuseOnBanUser", false);
- m_bClearServerHistory = getBool("ClearServerHistoryOnBanUser", false);
- m_bRemoveFromFrendlist = getBool("RemoveFromFrendlistOnBanUser", false);
- m_bRemoveFromClist = getBool("RemoveFromClistOnBanUser", false);
- m_bPopUpSyncHistory = getBool("PopUpSyncHistory", false);
+ m_bMesAsUnread = getBool("MesAsUnread");
+ m_bUseLocalTime = getBool("UseLocalTime");
+ m_bReportAbuse = getBool("ReportAbuseOnBanUser");
+ m_bClearServerHistory = getBool("ClearServerHistoryOnBanUser");
+ m_bRemoveFromFrendlist = getBool("RemoveFromFrendlistOnBanUser");
+ m_bRemoveFromClist = getBool("RemoveFromClistOnBanUser");
+ m_bPopUpSyncHistory = getBool("PopUpSyncHistory");
m_iMarkMessageReadOn = (MarkMsgReadOn)getByte("MarkMessageReadOn", markOnRead);
- m_bStikersAsSmyles = getBool("StikersAsSmyles", false);
- m_bUserForceOnlineOnActivity = getBool("UserForceOnlineOnActivity", false);
+ m_bStikersAsSmyles = getBool("StikersAsSmyles");
+ m_bUserForceOnlineOnActivity = getBool("UserForceOnlineOnActivity");
m_iMusicSendMetod = (MusicSendMetod)getByte("MusicSendMetod", sendBroadcastOnly);
m_iSyncHistoryMetod = (SyncHistoryMetod)getByte("SyncHistoryMetod", syncOff);
CMStringA szListeningTo(m_szModuleName);
szListeningTo += "Enabled";
db_set_b(NULL, "ListeningTo", szListeningTo, m_iMusicSendMetod == 0 ? 0 : 1);
- m_bNewsEnabled = getBool("NewsEnabled", false);
+ m_bNewsEnabled = getBool("NewsEnabled");
m_iMaxLoadNewsPhoto = getByte("MaxLoadNewsPhoto", 5);
- m_bNotificationsEnabled = getBool("NotificationsEnabled", false);
+ m_bNotificationsEnabled = getBool("NotificationsEnabled");
m_bNotificationsMarkAsViewed = getBool("NotificationsMarkAsViewed", true);
- m_bSpecialContactAlwaysEnabled = getBool("SpecialContactAlwaysEnabled", false);
+ m_bSpecialContactAlwaysEnabled = getBool("SpecialContactAlwaysEnabled");
m_iNewsInterval = getDword("NewsInterval", 15);
m_iNotificationsInterval = getDword("NotificationsInterval", 1);
- m_iIMGBBCSupport = (IMGBBCSypport)getByte("IMGBBCSupport", 0);
- m_iBBCForNews = (BBCSupport)getByte("BBCForNews", 1);
- m_iBBCForAttachments = (BBCSupport)getByte("BBCForAttachments", 1);
+ m_iIMGBBCSupport = (IMGBBCSypport)getByte("IMGBBCSupport", imgNo);
+ m_iBBCForNews = (BBCSupport)getByte("BBCForNews", bbcBasic);
+ m_iBBCForAttachments = (BBCSupport)getByte("BBCForAttachments", bbcBasic);
m_bUseBBCOnAttacmentsAsNews = getBool("UseBBCOnAttacmentsAsNews", true);
- m_bNewsAutoClearHistory = getBool("NewsAutoClearHistory", false);
+ m_bNewsAutoClearHistory = getBool("NewsAutoClearHistory");
m_iNewsAutoClearHistoryInterval = getDword("NewsAutoClearHistoryInterval", 60*60*24*3);
m_bNewsFilterPosts = getBool("NewsFilterPosts", true);
@@ -105,8 +105,8 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : m_bNewsSourceGroups = getBool("NewsSourceGroups", true);
m_bNewsSourcePages = getBool("NewsSourcePages", true);
m_bNewsSourceFollowing = getBool("NewsSourceFollowing", true);
- m_bNewsSourceIncludeBanned = getBool("NewsSourceIncludeBanned", false);
- m_bNewsSourceNoReposts = getBool("NewsSourceNoReposts", false);
+ m_bNewsSourceIncludeBanned = getBool("NewsSourceIncludeBanned");
+ m_bNewsSourceNoReposts = getBool("NewsSourceNoReposts");
m_bNotificationFilterComments = getBool("NotificationFilterComments", true);
m_bNotificationFilterLikes = getBool("NotificationFilterLikes", true);
@@ -354,7 +354,7 @@ void CVkProto::InitMenus() int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
{
LONG userID = getDword(hContact, "ID", -1);
- bool bisFriend = (getByte(hContact, "Auth", -1) == 0);
+ bool bisFriend = (getBool(hContact, "Auth", true) == 0);
bool bisBroadcast = !(IsEmpty(ptrT(db_get_tsa(hContact, m_szModuleName, "AudioUrl"))));
Menu_ShowItem(g_hContactMenuItems[CMI_VISITPROFILE], !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_WALLPOST], !isChatRoom(hContact));
@@ -362,7 +362,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_BANUSER], !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_REPORTABUSE], !isChatRoom(hContact) && userID != VK_FEED_USER);
- Menu_ShowItem(g_hContactMenuItems[CMI_DESTROYKICKCHAT], isChatRoom(hContact) && getBool(hContact, "off", false));
+ Menu_ShowItem(g_hContactMenuItems[CMI_DESTROYKICKCHAT], isChatRoom(hContact) && getBool(hContact, "off"));
Menu_ShowItem(g_hContactMenuItems[CMI_OPENBROADCAST], !isChatRoom(hContact) && bisBroadcast);
Menu_ShowItem(g_hContactMenuItems[CMI_GETSERVERHISTORY], !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_LOADVKNEWS], userID == VK_FEED_USER);
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index 957da57c42..26df986df8 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -96,7 +96,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) mir_free(pParam->pszNick);
delete pParam;
}
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
return;
}
@@ -109,7 +109,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) mir_free(pParam->pszNick);
delete pParam;
}
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
return;
}
@@ -148,7 +148,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
}
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
if (pParam) {
mir_free(pParam->pszFirstName);
mir_free(pParam->pszLastName);
@@ -161,20 +161,20 @@ void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) {
debugLogA("CVkProto::OnSearch %d", reply->resultCode);
if (reply->resultCode != 200) {
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
return;
}
JSONNode jnRoot;
const JSONNode &jnResponse = CheckJsonResponse(pReq, reply, jnRoot);
if (!jnResponse) {
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
return;
}
const JSONNode &jnItems = jnResponse["found"];
if (!jnItems) {
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
return;
}
@@ -203,5 +203,5 @@ void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
}
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1);
}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index fe0b523837..2ccaab343f 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -88,7 +88,7 @@ void CVkProto::OnLoggedOut() m_bOnline = false;
if (m_pollingConn)
- CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConn, 0);
+ CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConn);
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE);
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
@@ -471,7 +471,7 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (userid == 0)
break;
hContact = FindUser(userid, true);
- if (!getBool(hContact, "ReqAuth", false)) {
+ if (!getBool(hContact, "ReqAuth")) {
RetrieveUserInfo(userid);
setByte(hContact, "ReqAuth", 1);
ForkThread(&CVkProto::DBAddAuthRequestThread, (void *)hContact);
@@ -501,7 +501,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq if (!jnResponse)
return;
- bool bCleanContacts = getBool("AutoClean", false);
+ bool bCleanContacts = getBool("AutoClean");
LIST<void> arContacts(10, PtrKeySortT);
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
@@ -533,7 +533,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq LONG userID = getDword(hContact, "ID", -1);
if (userID == m_myUserId || userID == VK_FEED_USER)
continue;
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
}
arContacts.destroy();
@@ -666,7 +666,7 @@ INT_PTR __cdecl CVkProto::SvcBanUser(WPARAM hContact, LPARAM) << VER_API);
if (m_bRemoveFromClist)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
return 0;
}
|