diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-09 21:40:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-09 21:40:22 +0000 |
commit | 3dc0d9b0b7c30ea2f77d74c4ce5b6ccd67bd525c (patch) | |
tree | efee912ee654baafeb98efcd117921db6b7489bc /protocols/FacebookRM/src | |
parent | bcb27264ba737778e5d3edad36088bacf74f0236 (diff) |
- the kernel filters out contacts by proto names much faster than a plugin;
- database cycles simplified
git-svn-id: http://svn.miranda-ng.org/main/trunk@4404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 8 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 392b95df82..0d3ba50bfe 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -38,7 +38,7 @@ bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat) HANDLE FacebookProto::ChatIDToHContact(std::string chat_id)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if(!IsMyContact(hContact, true))
continue;
@@ -60,8 +60,8 @@ HANDLE FacebookProto::ChatIDToHContact(std::string chat_id) HANDLE FacebookProto::ContactIDToHContact(std::string user_id)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if(!IsMyContact(hContact))
+ for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ if (!IsMyContact(hContact))
continue;
DBVARIANT dbv;
@@ -135,7 +135,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, BYTE type, bool dont_ void FacebookProto::SetAllContactStatuses(int status, bool reset_client)
{
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if (!IsMyContact(hContact))
+ if ( db_get_b(hContact,m_szModuleName,"ChatRoom",0))
continue;
if (reset_client) {
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index e3f1a014ba..ae0911e3f0 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -160,8 +160,8 @@ void FacebookProto::ProcessFriendList( void* data ) // Check and update old contacts
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if (!IsMyContact(hContact))
+ for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ if ( db_get_b(hContact,m_szModuleName,"ChatRoom",0))
continue;
DBVARIANT dbv;
|