diff options
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 5 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 6 |
4 files changed, 7 insertions, 9 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 07086cb981..7c42c1a951 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -28,8 +28,7 @@ bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat) if (proto && !strcmp(m_szModuleName, proto)) {
if (include_chat)
return true;
- else
- return !getByte(hContact, "ChatRoom", 0);
+ return !isChatRoom(hContact);
}
return false;
}
@@ -119,7 +118,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, boo void FacebookProto::SetAllContactStatuses(int status, bool reset_client)
{
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (getByte(hContact, "ChatRoom", 0))
+ if ( isChatRoom(hContact))
continue;
if (reset_client) {
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 44c90e90fe..2541fe07f8 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -158,7 +158,7 @@ void FacebookProto::ProcessFriendList(void* data) // Check and update old contacts
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (getByte(hContact, "ChatRoom", 0))
+ if ( isChatRoom(hContact))
continue;
DBVARIANT dbv;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 55655dbb10..41ac1cef71 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -551,8 +551,7 @@ INT_PTR FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
// Ignore groupchats and, if deleting, also not-friends
- if (getByte(hContact, "ChatRoom", 0)
- || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
+ if ( isChatRoom(hContact) || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
return 0;
ptrT tname = db_get_tsa(hContact, m_szModuleName, FACEBOOK_KEY_NAME);
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index f7c6889c66..054a05c134 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -146,12 +146,12 @@ void UninitContactMenus() int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
- bool isChatroom = getByte(hContact, "ChatRoom", 0) > 0;
+ bool bIsChatroom = isChatRoom(hContact);
Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], true);
- Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_FRIENDSHIP], !isChatroom);
+ Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_FRIENDSHIP], !bIsChatroom);
- if (!isOffline() && !isChatroom)
+ if (!isOffline() && !bIsChatroom)
{
bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
BYTE type = getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0);
|