diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-06 02:08:17 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-06 02:08:17 +0000 |
commit | 381ae22157acdbdc1d8b2760b8f58c5d1d0aba37 (patch) | |
tree | b1706363c1419e398b40dce57e4a75d46cdfd065 /protocols/MRA | |
parent | 522586d7b8f7274fad2fe58c2615fc0d06618fcd (diff) |
MRA:
* Unused code cleaup
git-svn-id: http://svn.miranda-ng.org/main/trunk@8424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 6 | ||||
-rw-r--r-- | protocols/MRA/src/MraSendCommand.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_menus.cpp | 20 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index f6eea6903a..54f9c5efe7 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -421,7 +421,7 @@ int CMraProto::SendMsg(MCONTACT hContact, int flags, const char *lpszMessage) int iRet = 0;
if (flags & PREF_UNICODE)
- lpwszMessage = (LPWSTR)(lpszMessage + lstrlenA(lpszMessage)+1 );
+ lpwszMessage = (LPWSTR)(lpszMessage + lstrlenA(lpszMessage) + 1);
else if (flags & PREF_UTF)
lpwszMessage = mir_utf8decodeT(lpszMessage);
else
@@ -590,11 +590,11 @@ int CMraProto::SetAwayMsg(int m_iStatus, const TCHAR* msg) int CMraProto::UserIsTyping(MCONTACT hContact, int type)
{
- if (!m_bLoggedIn || !hContact || type == PROTOTYPE_SELFTYPING_OFF)
+ if (!m_bLoggedIn || m_iStatus == ID_STATUS_INVISIBLE || !hContact || type == PROTOTYPE_SELFTYPING_OFF)
return 1;
CMStringA szEmail;
- if ( MraGetContactStatus(hContact) != ID_STATUS_OFFLINE && m_iStatus != ID_STATUS_INVISIBLE)
+ if ( MraGetContactStatus(hContact) != ID_STATUS_OFFLINE)
if ( mraGetStringA(hContact, "e-mail", szEmail))
if ( MraMessage(FALSE, hContact, 0, MESSAGE_FLAG_NOTIFY, szEmail, L" ", NULL, 0))
return 0;
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index ed502a3cd9..91e55a8401 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -148,7 +148,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType buf.SetLPS(CMStringA((LPSTR)lpbMultiChatData, dwMultiChatDataSize));
if (bAddToQueue)
- dwRet = MraSendQueueCMD(hSendQueueHandle, 0, hContact, dwAckType, (LPBYTE)(LPCWSTR)lpwszMessage, lpwszMessage.GetLength()*sizeof(WCHAR), MRIM_CS_MESSAGE, buf.Data(), buf.Len());
+ dwRet = MraSendQueueCMD(hSendQueueHandle, 0, hContact, dwAckType, NULL, 0, MRIM_CS_MESSAGE, buf.Data(), buf.Len());
else
dwRet = MraSendCMD(MRIM_CS_MESSAGE, buf.Data(), buf.Len());
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index d8dc3c9e33..1171f147bd 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -78,18 +78,18 @@ INT_PTR CMraProto::MraRequestAuthorization(WPARAM hContact, LPARAM lParam) if (!mraGetStringW(NULL, "AuthMessage", wszAuthMessage))
wszAuthMessage = TranslateT(MRA_DEFAULT_AUTH_MESSAGE);
- if (!wszAuthMessage.IsEmpty()) {
- CMStringA szEmail;
- if (mraGetStringA(hContact, "e-mail", szEmail)) {
- BOOL bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
- int iRet = MraMessage(bSlowSend, hContact, ACKTYPE_AUTHREQ, MESSAGE_FLAG_AUTHORIZE, szEmail, wszAuthMessage, NULL, 0);
- if (bSlowSend == FALSE)
- ProtoBroadcastAck(hContact, ACKTYPE_AUTHREQ, ACKRESULT_SUCCESS, (HANDLE)iRet, 0);
+ if (wszAuthMessage.IsEmpty())
+ return 1;
- return 0;
- }
- }
+ CMStringA szEmail;
+ if (mraGetStringA(hContact, "e-mail", szEmail)) {
+ BOOL bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
+ int iRet = MraMessage(bSlowSend, hContact, ACKTYPE_AUTHREQ, MESSAGE_FLAG_AUTHORIZE, szEmail, wszAuthMessage, NULL, 0);
+ if (bSlowSend == FALSE)
+ ProtoBroadcastAck(hContact, ACKTYPE_AUTHREQ, ACKRESULT_SUCCESS, (HANDLE)iRet, 0);
+ return 0;
+ }
return 1;
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index e1840dc275..5ce49e47bc 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -710,8 +710,8 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf)
{
- DWORD dwAckType; MCONTACT hContact; LPBYTE pData; size_t dataLen;
- if (!MraSendQueueFind(hSendQueueHandle, seq, NULL, &hContact, &dwAckType, &pData, &dataLen)) {
+ DWORD dwAckType; MCONTACT hContact;
+ if (!MraSendQueueFind(hSendQueueHandle, seq, NULL, &hContact, &dwAckType, NULL, NULL)) {
DWORD dwTemp = buf.getDword();
switch (dwTemp) {
case CONTACT_OPER_SUCCESS:// ## добавление произведено успешно
@@ -758,8 +758,8 @@ bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf) bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf)
{
- DWORD dwAckType, dwFlags; MCONTACT hContact; LPBYTE pData; size_t dataLen;
- if (MraSendQueueFind(hSendQueueHandle, seq, &dwFlags, &hContact, &dwAckType, &pData, &dataLen)) {
+ DWORD dwAckType, dwFlags; MCONTACT hContact;
+ if (MraSendQueueFind(hSendQueueHandle, seq, &dwFlags, &hContact, &dwAckType, NULL, NULL)) {
MraPopupShowFromAgentW(MRA_POPUP_TYPE_DEBUG, 0, TranslateT("MRIM_ANKETA_INFO: not found in queue"));
return true;
}
|