diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
commit | 30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch) | |
tree | b1dae7a6d545cdf622a165ba4c576d3a41d71221 /protocols/FacebookRM/messages.cpp | |
parent | 65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff) |
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed
- dynamically translated hot keys;
- checked correct LPGEN'ing of the sounds creation;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/messages.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/FacebookRM/messages.cpp b/protocols/FacebookRM/messages.cpp index def7a6b64b..1f6d80a6d5 100644 --- a/protocols/FacebookRM/messages.cpp +++ b/protocols/FacebookRM/messages.cpp @@ -26,9 +26,9 @@ int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre) {
DBVARIANT dbv;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
- ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ) );
+ ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ));
DBFreeVariant(&dbv);
}
@@ -49,11 +49,11 @@ void FacebookProto::SendMsgWorker(void *p) DBVARIANT dbv;
- if ( !isOnline( ) )
+ if ( !isOnline( ))
{
ProtoBroadcastAck(m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
}
- else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
int retries = 5;
std::string error_text = "";
@@ -64,7 +64,7 @@ void FacebookProto::SendMsgWorker(void *p) }
if (result) {
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS, data->msgid,0);
- MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ) );
+ MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ));
} else {
char *err = mir_utf8decodeA(error_text.c_str());
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, data->msgid,(LPARAM)err);
@@ -118,7 +118,7 @@ int FacebookProto::SendMsg(HANDLE hContact, int flags, const char *msg) msg = mir_utf8encode(msg);
facy.msgid_ = (facy.msgid_ % 1024)+1;
- ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_) );
+ ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_));
return facy.msgid_;
}
@@ -146,14 +146,14 @@ void FacebookProto::SendTypingWorker(void *p) facy.is_typing_ = (typing->status == PROTOTYPE_SELFTYPING_ON);
SleepEx( 2000, true );
- if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON) )
+ if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON))
{
delete typing;
return;
}
DBVARIANT dbv;
- if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string data = "typ=";
data += ( typing->status == PROTOTYPE_SELFTYPING_ON ) ? "1" : "0"; // PROTOTYPE_SELFTYPING_OFF
@@ -162,7 +162,7 @@ void FacebookProto::SendTypingWorker(void *p) data += "&source=mercury-chat";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&post_form_id=";
- data += ( facy.post_form_id_.length( ) ) ? facy.post_form_id_ : "0";
+ data += ( facy.post_form_id_.length( )) ? facy.post_form_id_ : "0";
data += "&post_form_id_source=AsyncRequest&lsd=&phstamp=0&__user=";
data += facy.self_.user_id;
@@ -184,7 +184,7 @@ void FacebookProto::MessagingWorker(void *p) if (data->type == FACEBOOK_RECV_MESSAGE)
facy.chat_mark_read( data->user_id );
-// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ) )
+// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ))
// facy.close_chat( data->user_id );
delete data;
|