summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/docs/facebook - readme.txt2
-rw-r--r--protocols/FacebookRM/src/db.h2
-rw-r--r--protocols/FacebookRM/src/json.cpp6
-rw-r--r--protocols/FacebookRM/src/process.cpp4
-rw-r--r--protocols/FacebookRM/src/proto.cpp8
-rw-r--r--protocols/FacebookRM/src/proto.h2
6 files changed, 12 insertions, 12 deletions
diff --git a/protocols/FacebookRM/docs/facebook - readme.txt b/protocols/FacebookRM/docs/facebook - readme.txt
index 9b3d740536..bb813ddea2 100644
--- a/protocols/FacebookRM/docs/facebook - readme.txt
+++ b/protocols/FacebookRM/docs/facebook - readme.txt
@@ -32,7 +32,7 @@ Info:
"KeepUnread" (Byte) - 1 = Don't mark messages as read on server (works globally or per contact)
"NaseemsSpamMode" (Byte) - 1 = Don't add contacts when we send message to them from other instances, add them only when they reply
"NameAsNick" (Byte) - 0 = don't use real name as nickname, use nickname if possible (default is 1)
-"DisableChat" (Byte) - 1 = don't use multi user chat at all
+"EnableChat" (Byte) - 0 = don't use multi user chat at all (default is 1)
--------------------------------
Version history
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h
index 88a2b35988..d978fd4f98 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_NASEEMS_SPAM_MODE "NaseemsSpamMode" // [HIDDEN] - 1 = don't load messages sent from other instances (e.g., browser) - known as "Naseem's spam mode"
#define FACEBOOK_KEY_NAME_AS_NICK "NameAsNick" // [HIDDEN] - 0 = don't use real name as nickname, use nickname if possible
#define FACEBOOK_KEY_OPEN_URL_BROWSER "OpenUrlBrowser" // [HIDDEN] - (unicode) = absolute path to browser to open url links with
-#define FACEBOOK_KEY_DISABLE_CHAT "DisableChat" // [HIDDEN] - 1 = don't use multi user chat at all
+#define FACEBOOK_KEY_ENABLE_CHAT "EnableChat" // [HIDDEN] - 0 = don't use multi user chat at all (default is 1)
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
#define FACEBOOK_KEY_EVENT_FEEDS_ENABLE "EventFeedsEnable"
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index eb1bd02d95..005780b45f 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -444,7 +444,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
JSONNODE *threadid = json_get(it, "tid");
if (threadid != NULL) { // multi user chat
- if (proto->m_disableChat)
+ if (!proto->m_enableChat)
continue;
std::tstring tid = json_as_string(threadid);
@@ -606,7 +606,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
proto->StopTyping(hContact);
} else if (t == "ttyp") {
// multi chat typing notification
- if (proto->m_disableChat)
+ if (!proto->m_enableChat)
continue;
JSONNODE *from_ = json_get(it, "from");
@@ -688,7 +688,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
}*/
} else if (t == "mercury") {
// rename multi user chat, ...
- if (proto->m_disableChat)
+ if (!proto->m_enableChat)
continue;
JSONNODE *actions_ = json_get(it, "actions");
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index da8fb609b8..137483d9f6 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -461,7 +461,7 @@ void FacebookProto::LoadLastMessages(void *p)
bool isChat = isChatRoom(hContact);
- if (isChat && m_disableChat)
+ if (isChat && !m_enableChat)
return;
ptrA item_id(getStringA(hContact, isChat ? FACEBOOK_KEY_TID : FACEBOOK_KEY_ID));
@@ -601,7 +601,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo
DWORD timestamp = local_timestamp || !messages[i]->time ? ::time(NULL) : messages[i]->time;
if (messages[i]->isChat) {
- if (m_disableChat) {
+ if (!m_enableChat) {
delete messages[i];
continue;
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 708f692c64..fe062681b2 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -36,7 +36,7 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) :
facy.fcb_conn_lock_ = CreateMutex(NULL, FALSE, NULL);
m_invisible = false;
- m_disableChat = getBool(FACEBOOK_KEY_DISABLE_CHAT, false);
+ m_enableChat = getBool(FACEBOOK_KEY_ENABLE_CHAT, true);
CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI);
CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg);
@@ -45,7 +45,7 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) :
CreateProtoService(PS_GETAVATARCAPS, &FacebookProto::GetAvatarCaps);
CreateProtoService(PS_GETUNREADEMAILCOUNT, &FacebookProto::GetNotificationsCount);
- if (!m_disableChat) {
+ if (m_enableChat) {
CreateProtoService(PS_JOINCHAT, &FacebookProto::OnJoinChat);
CreateProtoService(PS_LEAVECHAT, &FacebookProto::OnLeaveChat);
}
@@ -119,7 +119,7 @@ DWORD_PTR FacebookProto::GetCaps(int type, MCONTACT hContact)
{
case PFLAGNUM_1:
{
- DWORD_PTR flags = PF1_IM | (!m_disableChat ? PF1_CHAT : 0) | PF1_SERVERCLIST | PF1_AUTHREQ | /*PF1_ADDED |*/ PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_ADDSEARCHRES; // | PF1_VISLIST | PF1_INVISLIST;
+ DWORD_PTR flags = PF1_IM | (m_enableChat ? PF1_CHAT : 0) | PF1_SERVERCLIST | PF1_AUTHREQ | /*PF1_ADDED |*/ PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_ADDSEARCHRES; // | PF1_VISLIST | PF1_INVISLIST;
if (getByte(FACEBOOK_KEY_SET_MIRANDA_STATUS, 0))
return flags |= PF1_MODEMSG;
@@ -419,7 +419,7 @@ INT_PTR FacebookProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
int FacebookProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
// Register group chat
- if (!m_disableChat) {
+ if (m_enableChat) {
GCREGISTER gcr = { sizeof(gcr) };
gcr.dwFlags = 0; //GC_ACKMSG;
gcr.pszModule = m_szModuleName;
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index 53d9f477fc..56177acb86 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -52,7 +52,7 @@ public:
}
bool m_invisible;
- bool m_disableChat;
+ bool m_enableChat;
// DB utils missing in proto_interface