summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_protoint.h6
-rw-r--r--include/m_protomod.h4
-rw-r--r--protocols/AimOscar/src/avatars.cpp6
-rw-r--r--protocols/AimOscar/src/connection.cpp6
-rw-r--r--protocols/AimOscar/src/direct_connect.cpp6
-rw-r--r--protocols/AimOscar/src/file.cpp20
-rw-r--r--protocols/AimOscar/src/proto.cpp14
-rw-r--r--protocols/AimOscar/src/proto.h2
-rw-r--r--protocols/AimOscar/src/proxy.cpp10
-rw-r--r--protocols/AimOscar/src/server.cpp14
-rw-r--r--protocols/AimOscar/src/thread.cpp2
-rw-r--r--protocols/AimOscar/src/utility.cpp7
-rw-r--r--protocols/FacebookRM/src/avatars.cpp4
-rw-r--r--protocols/FacebookRM/src/connection.cpp11
-rw-r--r--protocols/FacebookRM/src/messages.cpp6
-rw-r--r--protocols/FacebookRM/src/process.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp8
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp14
-rw-r--r--protocols/Gadu-Gadu/src/filetransfer.cpp28
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp10
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp106
-rw-r--r--protocols/IRCG/src/ircproto.cpp13
-rw-r--r--protocols/IRCG/src/services.cpp6
-rw-r--r--protocols/IRCG/src/windows.cpp4
-rw-r--r--protocols/MRA/src/MraAvatars.cpp18
-rw-r--r--protocols/MRA/src/MraFilesQueue.cpp40
-rw-r--r--protocols/MRA/src/MraMRIMProxy.cpp4
-rw-r--r--protocols/MRA/src/MraProto.cpp2
-rw-r--r--protocols/MRA/src/Mra_proto.cpp2
-rw-r--r--protocols/Omegle/src/connection.cpp4
-rw-r--r--protocols/Tlen/src/jabber_svc.cpp4
-rw-r--r--protocols/Twitter/src/connection.cpp20
-rw-r--r--protocols/Twitter/src/contacts.cpp12
-rw-r--r--protocols/Twitter/src/proto.cpp6
-rw-r--r--protocols/Yahoo/src/avatar.cpp6
-rw-r--r--protocols/Yahoo/src/file_transfer.cpp14
-rw-r--r--protocols/Yahoo/src/im.cpp6
-rw-r--r--protocols/Yahoo/src/proto.cpp6
-rw-r--r--protocols/Yahoo/src/services.cpp2
-rw-r--r--protocols/Yahoo/src/yahoo.cpp8
40 files changed, 231 insertions, 234 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 471108ba55..0c457f03cc 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_PROTOINT_H__ 1
#include <m_system_cpp.h>
+#include <m_protomod.h>
typedef enum
{
@@ -53,6 +54,11 @@ struct PROTO_INTERFACE : public MZeroedObject
char* m_szModuleName;
HANDLE m_hProtoIcon;
+ DWORD __forceinline ProtoBroadcastAck(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
+ {
+ return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam);
+ }
+
virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0;
virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) = 0;
diff --git a/include/m_protomod.h b/include/m_protomod.h
index d8d364b987..0bc0a073b4 100644
--- a/include/m_protomod.h
+++ b/include/m_protomod.h
@@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h>
-#include "m_protocols.h"
-#include "m_protosvc.h"
+#include <m_protocols.h>
+#include <m_protosvc.h>
//notify the protocol manager that you're around
//wParam = 0
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp
index 26cabfb9a8..721488c6f2 100644
--- a/protocols/AimOscar/src/avatars.cpp
+++ b/protocols/AimOscar/src/avatars.cpp
@@ -75,7 +75,7 @@ void CAimProto::avatar_request_handler(HANDLE hContact, char* hash, unsigned cha
setByte(hContact, AIM_KEY_AHT, type);
setString(hContact, AIM_KEY_AH, hash);
- sendBroadcast(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
}
else
@@ -85,7 +85,7 @@ void CAimProto::avatar_request_handler(HANDLE hContact, char* hash, unsigned cha
deleteSetting(hContact, AIM_KEY_AHT);
deleteSetting(hContact, AIM_KEY_AH);
- sendBroadcast(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
}
mir_free(saved_hash);
@@ -123,7 +123,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const
else
LOG("AIM sent avatar of zero length for %s.(Usually caused by repeated request for the same icon)", sn);
- sendBroadcast(AI.hContact, ACKTYPE_AVATAR, res ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, &AI, 0);
+ ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, res ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, &AI, 0);
}
int detect_image_type(const char* stream, const TCHAR* &type_ret)
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp
index 216821a790..a7fb998ca1 100644
--- a/protocols/AimOscar/src/connection.cpp
+++ b/protocols/AimOscar/src/connection.cpp
@@ -147,11 +147,11 @@ void CAimProto::aim_connection_authorization(void)
return;
case 2:
- sendBroadcast(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
goto exit;
case 3:
- sendBroadcast(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
goto exit;
}
}
@@ -271,7 +271,7 @@ void __cdecl CAimProto::aim_protocol_negotiation( void* )
}
else if (flap.cmp(0x04))
{
- sendBroadcast(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
LOG("Connection Negotiation Thread Ending: Flap 0x04");
goto exit;
}
diff --git a/protocols/AimOscar/src/direct_connect.cpp b/protocols/AimOscar/src/direct_connect.cpp
index 4552b461cf..f6d996ea37 100644
--- a/protocols/AimOscar/src/direct_connect.cpp
+++ b/protocols/AimOscar/src/direct_connect.cpp
@@ -22,7 +22,7 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini
{
file_transfer *ft = (file_transfer*)param;
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
NETLIBPACKETRECVER packetRecv = {0};
packetRecv.cbSize = sizeof(packetRecv);
@@ -42,7 +42,7 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini
if (result == 0)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
}
else
{
@@ -60,7 +60,7 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini
}
}
aim_file_ad(hServerConn, seqno, ft->sn, ft->icbm_cookie, true, 0);
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
ft_list.remove_by_ft(ft);
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp
index 12ef935cd7..8cb4dcc4ca 100644
--- a/protocols/AimOscar/src/file.cpp
+++ b/protocols/AimOscar/src/file.cpp
@@ -197,7 +197,7 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI
tSelect.cbSize = sizeof(tSelect);
tSelect.hReadConns[0] = ft->hConn;
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
clock_t lNotify = clock();
for (;;)
@@ -212,13 +212,13 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI
if (clock() >= lNotify)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
if (CallService(MS_NETLIB_SELECT, 0, (LPARAM)&tSelect)) break;
lNotify = clock() + 500;
}
}
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
LOG("P2P: Finished sending file bytes.");
_close(fid);
}
@@ -233,7 +233,7 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI
LOG("P2P: Buddy says they got the file successfully");
if ((ft->pfts.currentFileNumber + 1) < ft->pfts.totalFiles)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
++ft->pfts.currentFileNumber; ++ft->cf;
if (!setup_next_file_send(ft))
@@ -264,7 +264,7 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI
if (Netlib_Send(ft->hConn, (char*)recv_ft, _htons(recv_ft->length), 0) <= 0) break;
ft->pfts.totalProgress += ft->pfts.currentFileProgress;
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
}
}
}
@@ -355,7 +355,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
ft->pfts.tszCurrentFile = mir_tstrdup(fname);
ResetEvent(ft->hResumeEvent);
- if (sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, ft, (LPARAM)&ft->pfts))
+ if (ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, ft, (LPARAM)&ft->pfts))
WaitForSingleObject(ft->hResumeEvent, INFINITE);
if (ft->pfts.tszCurrentFile)
@@ -389,7 +389,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
oft->type = _htons(0x0204);
_close(fid);
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
++ft->pfts.currentFileNumber;
ft->pfts.currentFileProgress = 0;
}
@@ -399,7 +399,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
{
oft->type = _htons(0x0204);
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
++ft->pfts.currentFileNumber;
ft->pfts.currentFileProgress = 0;
}
@@ -437,7 +437,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
_write(fid, packetRecv.buffer, packetRecv.bytesAvailable);
ft->pfts.currentFileProgress += packetRecv.bytesAvailable;
ft->pfts.totalProgress += packetRecv.bytesAvailable;
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts);
if (ft->pfts.currentFileSize == ft->pfts.currentFileProgress)
{
oft->type = _htons(0x0204);
@@ -456,7 +456,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
accepted_file = false;
_close(fid);
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
++ft->pfts.currentFileNumber;
ft->pfts.currentFileProgress = 0;
}
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp
index 2d5758a93b..6f9815a8a7 100644
--- a/protocols/AimOscar/src/proto.cpp
+++ b/protocols/AimOscar/src/proto.cpp
@@ -365,15 +365,15 @@ void __cdecl CAimProto::basic_search_ack_success(void* p)
{
if (strlen(sn) > 32)
{
- sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
else
{
PROTOSEARCHRESULT psr = {0};
psr.cbSize = sizeof(psr);
psr.id = (TCHAR*)sn;
- sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
- sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
}
mir_free(sn);
@@ -554,7 +554,7 @@ void __cdecl CAimProto::msg_ack_success(void* param)
msg_ack_param *msg_ack = (msg_ack_param*)param;
Sleep(150);
- sendBroadcast(msg_ack->hContact, ACKTYPE_MESSAGE,
+ ProtoBroadcastAck(msg_ack->hContact, ACKTYPE_MESSAGE,
msg_ack->success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED,
(HANDLE)msg_ack->id, (LPARAM)msg_ack->msg);
@@ -723,10 +723,10 @@ void __cdecl CAimProto::get_online_msg_thread(void* arg)
const HANDLE hContact = arg;
DBVARIANT dbv;
if (!db_get_ts(hContact, MOD_KEY_CL, OTH_KEY_SM, &dbv)) {
- sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
- else sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ else ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
HANDLE __cdecl CAimProto::GetAwayMsg(HANDLE hContact)
@@ -753,7 +753,7 @@ HANDLE __cdecl CAimProto::GetAwayMsg(HANDLE hContact)
int __cdecl CAimProto::RecvAwayMsg(HANDLE hContact, int statusMode, PROTORECVEVENT* pre)
{
- sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pre->szMessage);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pre->szMessage);
return 0;
}
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h
index 27cec08d83..5c8aa0bde9 100644
--- a/protocols/AimOscar/src/proto.h
+++ b/protocols/AimOscar/src/proto.h
@@ -492,8 +492,6 @@ struct CAimProto : public PROTO_INTERFACE
void setTString(HANDLE hContact, const char* name, const TCHAR* value);
void setWord(const char* name, WORD value);
void setWord(HANDLE hContact, const char* name, WORD value);
-
- int sendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
};
#endif
diff --git a/protocols/AimOscar/src/proxy.cpp b/protocols/AimOscar/src/proxy.cpp
index ee7927adc7..f3cc734127 100644
--- a/protocols/AimOscar/src/proxy.cpp
+++ b/protocols/AimOscar/src/proxy.cpp
@@ -44,12 +44,12 @@ void __cdecl CAimProto::aim_proxy_helper(void* param)
int recvResult = CallService(MS_NETLIB_GETMOREPACKETS, (WPARAM)hServerPacketRecver, (LPARAM)&packetRecv);
if (recvResult == 0)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
break;
}
if (recvResult == SOCKET_ERROR)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
break;
}
if (recvResult > 0)
@@ -100,7 +100,7 @@ void __cdecl CAimProto::aim_proxy_helper(void* param)
ft->accepted = true;
}
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
int i;
for (i = 21; --i; )
@@ -111,7 +111,7 @@ void __cdecl CAimProto::aim_proxy_helper(void* param)
}
if (i == 0)
{
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
break;
}
@@ -123,7 +123,7 @@ void __cdecl CAimProto::aim_proxy_helper(void* param)
else
result = receiving_file(ft, hServerPacketRecver, packetRecv);
- sendBroadcast(ft->hContact, ACKTYPE_FILE, result ? ACKRESULT_FAILED : ACKRESULT_SUCCESS, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, result ? ACKRESULT_FAILED : ACKRESULT_SUCCESS, ft, 0);
break;
}
}
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index 67af63c1f2..7c42ff979b 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -548,7 +548,7 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_SM, msg_s);
TCHAR* tszMsg = mir_utf8decodeT(msg_s);
- sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszMsg);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszMsg);
mir_free(tszMsg);
mir_free(msg);
mir_free(msg_s);
@@ -1447,7 +1447,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho
LOG("File transfer cancelled or denied.");
file_transfer* ft = ft_list.find_by_cookie(icbm_cookie, hContact);
- sendBroadcast(hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
ft_list.remove_by_ft(ft);
}
else if (rdz_msg_type == 2)//buddy accepts our file transfer request
@@ -1511,7 +1511,7 @@ void CAimProto::snac_file_decline(SNAC &snac)//family 0x0004
file_transfer *ft = ft_list.find_by_cookie(icbm_cookie, hContact);
if (ft)
{
- sendBroadcast(hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
if (ft->hConn) Netlib_Shutdown(ft->hConn);
else ft_list.remove_by_ft(ft);
}
@@ -1944,13 +1944,13 @@ void CAimProto::snac_email_search_results(SNAC &snac)//family 0x000A
offset+=TLV_HEADER_SIZE;
psr.id = (TCHAR*)tlv.dup();
offset+=tlv.len();
- sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
mir_free(psr.nick);
}
- sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
else // If no match, stop the search.
- CAimProto::sendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ CAimProto::ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
void CAimProto::snac_chatnav_info_response(SNAC &snac,HANDLE hServerConn,unsigned short &seqno)//family 0x000D
@@ -2256,7 +2256,7 @@ void CAimProto::snac_admin_account_infomod(SNAC &snac)//family 0x0007
setString(AIM_KEY_EM,email); // Save our email for future reference.
if (sn)
setString(AIM_KEY_SN,sn); // Update the database to reflect the formatted name.
- sendBroadcast( NULL, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0 );
+ ProtoBroadcastAck( NULL, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0 );
}
else if (snac.subcmp(0x0005) && !err) // Changed info
diff --git a/protocols/AimOscar/src/thread.cpp b/protocols/AimOscar/src/thread.cpp
index e8044f90d2..60f16f5263 100644
--- a/protocols/AimOscar/src/thread.cpp
+++ b/protocols/AimOscar/src/thread.cpp
@@ -86,7 +86,7 @@ void __cdecl CAimProto::accept_file_thread(void* param)//buddy sending file
{
aim_file_ad(hServerConn, seqno, ft->sn, ft->icbm_cookie, true, 0);
}
- sendBroadcast(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
ft_list.remove_by_ft(ft);
}
}
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 77c3960acd..f43e88aa63 100644
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -82,7 +82,7 @@ void CAimProto::broadcast_status(int status)
admin_seqno = 0;
}
- sendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
}
void CAimProto::start_connection(void *arg)
@@ -805,11 +805,6 @@ void CAimProto::setWord(HANDLE hContact, const char* name, WORD value)
{ db_set_w(hContact, m_szModuleName, name, value);
}
-int CAimProto::sendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
-{
- return ProtoBroadcastAck(m_szModuleName, hContact, type, result, hProcess, lParam);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void CAimProto::CreateProtoService(const char* szService, AimServiceFunc serviceProc)
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp
index eabb77c8f0..11c812fd0d 100644
--- a/protocols/FacebookRM/src/avatars.cpp
+++ b/protocols/FacebookRM/src/avatars.cpp
@@ -84,7 +84,7 @@ void FacebookProto::CheckAvatarChange(HANDLE hContact, std::string image_url)
if (hContact)
{
db_set_b(hContact, "ContactPhoto", "NeedUpdate", 1);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
else
{
@@ -119,7 +119,7 @@ void FacebookProto::UpdateAvatarWorker(void *)
bool success = facy.save_url(url, ai.filename, nlc);
if (ai.hContact)
- ProtoBroadcastAck(m_szModuleName, ai.hContact, ACKTYPE_AVATAR, success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
else if (success)
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
}
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp
index a5998569c7..6ba25ec470 100644
--- a/protocols/FacebookRM/src/connection.cpp
+++ b/protocols/FacebookRM/src/connection.cpp
@@ -49,7 +49,7 @@ void FacebookProto::ChangeStatus(void*)
facy.buddies.clear();
facy.messages_ignore.clear();
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
OnLeaveChat(NULL, NULL);
@@ -74,7 +74,7 @@ void FacebookProto::ChangeStatus(void*)
LOG("***** Beginning SignOn process");
m_iStatus = facy.self_.status_id = ID_STATUS_CONNECTING;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
ResetEvent(update_loop_lock_);
@@ -101,12 +101,11 @@ void FacebookProto::ChangeStatus(void*)
ForkThread(&FacebookProto::SetAwayMsgWorker, this, NULL);
}
} else {
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_FAILED,
- (HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_FAILED, (HANDLE)old_status, m_iStatus);
// Set to offline
m_iStatus = m_iDesiredStatus = facy.self_.status_id = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
LOG("***** SignOn failed");
@@ -126,7 +125,7 @@ void FacebookProto::ChangeStatus(void*)
facy.buddy_list();
m_iStatus = facy.self_.status_id = m_iDesiredStatus;
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
LOG("***** ChangeStatus complete");
}
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index dfa04d338d..e16af52dab 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -43,7 +43,7 @@ void FacebookProto::SendMsgWorker(void *p)
if (!isOnline())
{
- ProtoBroadcastAck(m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
}
else if (!db_get_s(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
@@ -57,11 +57,11 @@ void FacebookProto::SendMsgWorker(void *p)
retries--;
}
if (result) {
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS, data->msgid,0);
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, data->msgid, 0);
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)data->hContact, NULL);
} else {
char *err = mir_utf8decodeA(error_text.c_str());
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, data->msgid,(LPARAM)err);
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)err);
}
db_free(&dbv);
}
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 502deaa627..1ce4379c9f 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -834,7 +834,7 @@ void FacebookProto::SearchAckThread(void *targ)
isr.lastName = tsurname;
isr.email = tcommon;
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr);
mir_free(tid);
mir_free(tnick);
@@ -849,7 +849,7 @@ void FacebookProto::SearchAckThread(void *targ)
}
}
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, targ, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, targ, 0);
facy.handle_success("searchAckThread");
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index 1a89631748..d195d04ad2 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -231,12 +231,12 @@ void __cdecl GGPROTO::avatarrequestthread(void*)
pai.hContact = hContact;
INT_PTR res = getavatarinfo((WPARAM)GAIF_FORCE, (LPARAM)&pai);
if (res == GAIR_NOAVATAR){
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, 0);
} else if (res == GAIR_SUCCESS) {
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
} //if GAIR_WAITFOR -> ignore
} else {
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, 0, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, 0, 0);
}
} else {
gg_LeaveCriticalSection(&avatar_mutex, "avatarrequestthread", 3, 2, "avatar_mutex", 1);
@@ -300,7 +300,7 @@ void __cdecl GGPROTO::avatarrequestthread(void*)
}
else netlog("avatarrequestthread(): No response from HTTP request");
- ProtoBroadcastAck(m_szModuleName, pai.hContact, ACKTYPE_AVATAR,
+ ProtoBroadcastAck(pai.hContact, ACKTYPE_AVATAR,
result ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&pai, 0);
if (!pai.hContact)
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 4e307e6566..b8835c9596 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -560,7 +560,7 @@ retry:
case GG_EVENT_ACK:
if (e->event.ack.seq && e->event.ack.recipient)
{
- ProtoBroadcastAck(m_szModuleName, getcontact((DWORD)e->event.ack.recipient, 0, 0, NULL),
+ ProtoBroadcastAck(getcontact((DWORD)e->event.ack.recipient, 0, 0, NULL),
ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) e->event.ack.seq, 0);
}
break;
@@ -677,7 +677,7 @@ retry:
sr.email = strFmt2;
sr.id = _ultot(uin, strFmt1, 10);
sr.uin = uin;
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM)&sr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM)&sr);
}
if (((res->seq == GG_SEQ_INFO || res->seq == GG_SEQ_GETNICK) && hContact != NULL)
@@ -755,7 +755,7 @@ retry:
}
netlog("mainthread() (%x): Setting user info for uin %d.", this, uin);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
if (__nickname) mir_free(__nickname);
@@ -768,7 +768,7 @@ retry:
}
}
if (res->seq == GG_SEQ_SEARCH)
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
break;
}
@@ -1101,7 +1101,7 @@ retry:
if (dcc7->type == GG_SESSION_DCC7_SEND)
{
netlog("mainthread() (%x): File transfer denied by client %d (reason = %d).", this, dcc7->peer_uin, e->event.dcc7_reject.reason);
- ProtoBroadcastAck(m_szModuleName, dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck(dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Remove from watches and free
gg_EnterCriticalSection(&ft_mutex, "mainthread", 21, "ft_mutex", 1);
@@ -1162,7 +1162,7 @@ retry:
}
if (dcc7->contact)
- ProtoBroadcastAck(m_szModuleName, dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck(dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free dcc
gg_dcc7_free(dcc7);
@@ -1286,7 +1286,7 @@ void GGPROTO::broadcastnewstatus(int newStatus)
m_iStatus = newStatus;
gg_LeaveCriticalSection(&modemsg_mutex, "broadcastnewstatus", 24, 2, "modemsg_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, newStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, newStatus);
netlog("broadcastnewstatus(): Broadcast new status: %d.", newStatus);
}
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp
index f5436008a9..345537d9be 100644
--- a/protocols/Gadu-Gadu/src/filetransfer.cpp
+++ b/protocols/Gadu-Gadu/src/filetransfer.cpp
@@ -98,7 +98,7 @@ void __cdecl GGPROTO::ftfailthread(void *param)
struct ftfaildata *ft = (struct ftfaildata *)param;
netlog("ftfailthread(): started. Sending failed file transfer.");
gg_sleep(100, FALSE, "ftfailthread", 102, 1);
- ProtoBroadcastAck(m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft->hProcess, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft->hProcess, 0);
free(ft);
netlog("ftfailthread(): end.");
}
@@ -286,7 +286,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 3, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck(local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -317,11 +317,11 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc->file_info.size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 4, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck(local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 5, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
+ ProtoBroadcastAck(local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -361,7 +361,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
{
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 6, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
+ ProtoBroadcastAck(local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -516,7 +516,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc7->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 9, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck(local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -547,11 +547,11 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc7->size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 10, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck(local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc7->file_fd); local_dcc7->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 11, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
+ ProtoBroadcastAck(local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -595,7 +595,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
if (local_dcc7->contact) {
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 12, "ft_mutex", 1);
- ProtoBroadcastAck(m_szModuleName, local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
+ ProtoBroadcastAck(local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
@@ -684,7 +684,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
TCHAR error[512];
mir_sntprintf(error, SIZEOF(error), TranslateT("Can not create transfer file. ERROR: %d: %s (dcc)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
- ProtoBroadcastAck(m_szModuleName, dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck(dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Free transfer
gg_free_dcc(dcc);
return 0;
@@ -722,7 +722,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
if (iFtRemoveRes == -1)
{
netlog("dcc7fileallow(): File transfer denied.");
- ProtoBroadcastAck(m_szModuleName, dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck(dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -736,7 +736,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
mir_sntprintf(error, SIZEOF(error), TranslateT("Can not create transfer file. ERROR: %d: %s (dcc7)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
gg_dcc7_reject(dcc7, GG_DCC7_REJECT_USER);
- ProtoBroadcastAck(m_szModuleName, dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck(dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -807,7 +807,7 @@ int GGPROTO::dccfilecancel(HANDLE hTransfer)
gg_LeaveCriticalSection(&ft_mutex, "dccfilecancel", 44, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck(m_szModuleName, dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck(dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Close file
if (dcc->file_fd != -1)
{
@@ -837,7 +837,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer)
gg_LeaveCriticalSection(&ft_mutex, "dcc7filecancel", 45, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck(m_szModuleName, dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck(dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Close file
if (dcc7->file_fd != -1)
{
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index de44804182..b98bf1fda9 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -194,7 +194,7 @@ void __cdecl GGPROTO::cmdgetinfothread(void *hContact)
{
netlog("cmdgetinfothread(): started. Failed info retreival.");
gg_sleep(100, FALSE, "cmdgetinfothread", 103, 1);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE) 1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE) 1, 0);
netlog("cmdgetinfothread(): end.");
}
@@ -278,7 +278,7 @@ void __cdecl GGPROTO::searchthread(void *)
{
netlog("searchthread(): started. Failed search.");
gg_sleep(100, FALSE, "searchthread", 104, 1);
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1, 0);
#ifdef DEBUGMODE
netlog("searchthread(): end.");
#endif
@@ -599,7 +599,7 @@ typedef struct
void __cdecl GGPROTO::sendackthread(void *ack)
{
gg_sleep(100, FALSE, "sendackthread", 105, 1);
- ProtoBroadcastAck(m_szModuleName, ((GG_SEQ_ACK *)ack)->hContact,
+ ProtoBroadcastAck(((GG_SEQ_ACK *)ack)->hContact,
ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) ((GG_SEQ_ACK *)ack)->seq, 0);
mir_free(ack);
}
@@ -684,11 +684,11 @@ void __cdecl GGPROTO::getawaymsgthread(void *hContact)
gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
{
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) dbv.ptszVal);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) dbv.ptszVal);
netlog("getawaymsgthread(): Reading away msg <%S>.", dbv.ptszVal);
db_free(&dbv);
} else {
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) NULL);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) NULL);
}
netlog("getawaymsgthread(): end");
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 085431f8de..095a327f86 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -262,7 +262,7 @@ bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg)
return false;
}
-bool CIrcProto::OnIrc_WELCOME( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WELCOME(const CIrcMessage* pmsg)
{
if ( pmsg->parameters[0] != m_info.sNick )
m_info.sNick = pmsg->parameters[0];
@@ -286,7 +286,7 @@ bool CIrcProto::OnIrc_WELCOME( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOTOOLONG( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOTOOLONG(const CIrcMessage* pmsg)
{
CMString command = GetNextUserhostReason(2);
if ( command[0] == 'U' )
@@ -295,12 +295,12 @@ bool CIrcProto::OnIrc_WHOTOOLONG( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_BACKFROMAWAY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_BACKFROMAWAY(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
int Temp = m_iStatus;
m_iStatus = m_iDesiredStatus = ID_STATUS_ONLINE;
- ProtoBroadcastAck(m_szModuleName,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp, ID_STATUS_ONLINE);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, ID_STATUS_ONLINE);
if ( m_perform )
DoPerform( "Event: Available" );
@@ -310,12 +310,12 @@ bool CIrcProto::OnIrc_BACKFROMAWAY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_SETAWAY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_SETAWAY(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
int Temp = m_iDesiredStatus;
m_iStatus = m_iDesiredStatus = ID_STATUS_AWAY;
- ProtoBroadcastAck(m_szModuleName,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp, ID_STATUS_AWAY);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, ID_STATUS_AWAY);
if ( m_perform ) {
switch ( m_iStatus ) {
@@ -347,7 +347,7 @@ bool CIrcProto::OnIrc_SETAWAY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_JOIN( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg)
{
if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming && pmsg->prefix.sNick != m_info.sNick) {
CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
@@ -359,7 +359,7 @@ bool CIrcProto::OnIrc_JOIN( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_QUIT( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming)
{
@@ -384,7 +384,7 @@ bool CIrcProto::OnIrc_QUIT( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_PART( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_PART(const CIrcMessage* pmsg)
{
if ( pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming ) {
CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
@@ -408,7 +408,7 @@ bool CIrcProto::OnIrc_PART( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_KICK( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 )
DoEvent( GC_EVENT_KICK, pmsg->parameters[0].c_str(), pmsg->parameters[1].c_str(), pmsg->parameters.getCount()>2?pmsg->parameters[2].c_str():NULL, pmsg->prefix.sNick.c_str(), NULL, NULL, true, false);
@@ -439,7 +439,7 @@ bool CIrcProto::OnIrc_KICK( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_MODEQUERY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_MODEQUERY(const CIrcMessage* pmsg)
{
if ( pmsg->parameters.getCount() > 2 && pmsg->m_bIncoming && IsChannel( pmsg->parameters[1] )) {
CMString sPassword = _T("");
@@ -473,7 +473,7 @@ bool CIrcProto::OnIrc_MODEQUERY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_MODE( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg)
{
bool flag = false;
bool bContainsValidModes = false;
@@ -582,7 +582,7 @@ bool CIrcProto::OnIrc_MODE( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_NICK( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_NICK(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 0 ) {
bool bIsMe = pmsg->prefix.sNick.c_str() == m_info.sNick ? true : false;
@@ -611,7 +611,7 @@ bool CIrcProto::OnIrc_NICK( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_NOTICE( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 ) {
if ( IsCTCP( pmsg ))
@@ -654,7 +654,7 @@ bool CIrcProto::OnIrc_NOTICE( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_YOURHOST( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_YOURHOST(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
static const TCHAR* lpszFmt = _T("Your host is %99[^ \x5b,], running version %99s");
@@ -669,7 +669,7 @@ bool CIrcProto::OnIrc_YOURHOST( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_INVITE( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && ( m_ignore && IsIgnored( pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'i' )))
return true;
@@ -681,7 +681,7 @@ bool CIrcProto::OnIrc_INVITE( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_PINGPONG( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_PINGPONG(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->sCommand == _T("PING")) {
TCHAR szResponse[100];
@@ -692,7 +692,7 @@ bool CIrcProto::OnIrc_PINGPONG( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_PRIVMSG( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage* pmsg)
{
if ( pmsg->parameters.getCount() > 1 ) {
if ( IsCTCP( pmsg ))
@@ -742,7 +742,7 @@ bool CIrcProto::OnIrc_PRIVMSG( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
+bool CIrcProto::IsCTCP(const CIrcMessage* pmsg)
{
// is it a ctcp command, i e is the first and last characer of a PRIVMSG or NOTICE text ASCII 1
CMString mess = pmsg->parameters[1];
@@ -1234,7 +1234,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_NAMES( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_NAMES(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 3 )
sNamesList += pmsg->parameters[3] + _T(" ");
@@ -1242,7 +1242,7 @@ bool CIrcProto::OnIrc_NAMES( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 ) {
CMString name = _T("a");
@@ -1446,7 +1446,7 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_INITIALTOPIC( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_INITIALTOPIC(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 2 ) {
AddWindowItemData( pmsg->parameters[1].c_str(), 0, 0, 0, pmsg->parameters[2].c_str());
@@ -1458,7 +1458,7 @@ bool CIrcProto::OnIrc_INITIALTOPIC( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_INITIALTOPICNAME( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_INITIALTOPICNAME(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 3 ) {
TCHAR tTimeBuf[128], *tStopStr;
@@ -1472,7 +1472,7 @@ bool CIrcProto::OnIrc_INITIALTOPICNAME( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_TOPIC( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_TOPIC(const CIrcMessage* pmsg)
{
if ( pmsg->parameters.getCount() > 1 && pmsg->m_bIncoming ) {
DoEvent( GC_EVENT_TOPIC, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str(), NULL, sTopicTime.IsEmpty() ? NULL : sTopicTime.c_str(), NULL, true, false);
@@ -1492,7 +1492,7 @@ static void __stdcall sttShowDlgList( void* param )
SetEvent( ppro->m_evWndCreate );
}
-bool CIrcProto::OnIrc_LISTSTART( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_LISTSTART(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
CallFunctionAsync( sttShowDlgList, this );
@@ -1504,7 +1504,7 @@ bool CIrcProto::OnIrc_LISTSTART( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_LIST( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_LIST(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming == 1 && m_listDlg && pmsg->parameters.getCount() > 2 ) {
m_channelNumber++;
@@ -1561,7 +1561,7 @@ bool CIrcProto::OnIrc_LIST( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_LISTEND( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_LISTEND(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_listDlg ) {
EnableWindow(GetDlgItem(m_listDlg->GetHwnd(), IDC_JOIN), true);
@@ -1586,7 +1586,7 @@ bool CIrcProto::OnIrc_LISTEND( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_BANLIST( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_BANLIST(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 2 ) {
if ( m_managerDlg->GetHwnd() && (
@@ -1614,7 +1614,7 @@ bool CIrcProto::OnIrc_BANLIST( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_BANLISTEND( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_BANLISTEND(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 ) {
if ( m_managerDlg->GetHwnd() &&
@@ -1651,7 +1651,7 @@ static void __stdcall sttShowWhoisWnd( void* param )
delete pmsg;
}
-bool CIrcProto::OnIrc_WHOIS_NAME( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_NAME(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 5 && m_manualWhoisCount > 0 ) {
CallFunctionAsync( sttShowWhoisWnd, new CIrcMessage( *pmsg ));
@@ -1661,7 +1661,7 @@ bool CIrcProto::OnIrc_WHOIS_NAME( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_CHANNELS( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_CHANNELS(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0 )
m_whoisDlg->m_InfoChannels.SetText( pmsg->parameters[2].c_str());
@@ -1669,7 +1669,7 @@ bool CIrcProto::OnIrc_WHOIS_CHANNELS( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_AWAY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_AWAY(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0 )
m_whoisDlg->m_InfoAway2.SetText( pmsg->parameters[2].c_str());
@@ -1679,7 +1679,7 @@ bool CIrcProto::OnIrc_WHOIS_AWAY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_OTHER( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_OTHER(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0 ) {
TCHAR temp[1024], temp2[1024];
@@ -1692,13 +1692,13 @@ bool CIrcProto::OnIrc_WHOIS_OTHER( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_END( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_END(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 && m_manualWhoisCount < 1 ) {
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, true};
HANDLE hContact = CList_FindContact( &user );
if ( hContact )
- ProtoBroadcastAck( m_szModuleName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM)WhoisAwayReply.c_str());
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM)WhoisAwayReply.c_str());
}
m_manualWhoisCount--;
@@ -1708,7 +1708,7 @@ bool CIrcProto::OnIrc_WHOIS_END( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_IDLE( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_IDLE(const CIrcMessage* pmsg)
{
int D = 0;
int H = 0;
@@ -1746,7 +1746,7 @@ bool CIrcProto::OnIrc_WHOIS_IDLE( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_SERVER( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_SERVER(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0 )
m_whoisDlg->m_InfoServer.SetText( pmsg->parameters[2].c_str());
@@ -1754,7 +1754,7 @@ bool CIrcProto::OnIrc_WHOIS_SERVER( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_AUTH( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_AUTH(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0 ) {
if ( pmsg->sCommand == _T("330"))
@@ -1768,7 +1768,7 @@ bool CIrcProto::OnIrc_WHOIS_AUTH( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHOIS_NO_USER( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 2 && !IsChannel( pmsg->parameters[1] )) {
if ( m_whoisDlg )
@@ -1818,7 +1818,7 @@ static void __stdcall sttShowNickWnd( void* param )
delete pmsg;
}
-bool CIrcProto::OnIrc_NICK_ERR( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_NICK_ERR(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
if ( nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
@@ -1836,7 +1836,7 @@ bool CIrcProto::OnIrc_NICK_ERR( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_JOINERROR( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming ) {
DBVARIANT dbv;
@@ -1865,7 +1865,7 @@ bool CIrcProto::OnIrc_JOINERROR( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_UNKNOWN( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_UNKNOWN(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 0 ) {
if ( pmsg->parameters[0] == _T("WHO") && GetNextUserhostReason(2) != _T("U"))
@@ -1877,7 +1877,7 @@ bool CIrcProto::OnIrc_UNKNOWN( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_ENDMOTD( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_ENDMOTD(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && !bPerformDone )
DoOnConnect( pmsg );
@@ -1885,7 +1885,7 @@ bool CIrcProto::OnIrc_ENDMOTD( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_NOOFCHANNELS( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_NOOFCHANNELS(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 )
m_noOfChannels = StrToInt( pmsg->parameters[1].c_str());
@@ -1897,7 +1897,7 @@ bool CIrcProto::OnIrc_NOOFCHANNELS( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_ERROR( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_ERROR(const CIrcMessage* pmsg)
{
if ( pmsg->m_bIncoming && !m_disableErrorPopups && m_iDesiredStatus != ID_STATUS_OFFLINE) {
MIRANDASYSTRAYNOTIFY msn;
@@ -1920,7 +1920,7 @@ bool CIrcProto::OnIrc_ERROR( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_WHO_END( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg)
{
CMString command = GetNextUserhostReason(2);
if ( command[0] == 'S' ) {
@@ -2031,7 +2031,7 @@ LBL_Exit:
return true;
}
-bool CIrcProto::OnIrc_WHO_REPLY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg)
{
CMString command = PeekAtReasons(2);
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 6 && command[0] == 'S' ) {
@@ -2047,7 +2047,7 @@ bool CIrcProto::OnIrc_WHO_REPLY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_TRYAGAIN( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_TRYAGAIN(const CIrcMessage* pmsg)
{
CMString command = _T("");
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 ) {
@@ -2062,7 +2062,7 @@ bool CIrcProto::OnIrc_TRYAGAIN( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg)
{
CMString command = _T("");
if ( pmsg->m_bIncoming ) {
@@ -2205,7 +2205,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
return true;
}
-bool CIrcProto::OnIrc_SUPPORT( const CIrcMessage* pmsg )
+bool CIrcProto::OnIrc_SUPPORT(const CIrcMessage* pmsg)
{
static const TCHAR* lpszFmt = _T("Try server %99[^ ,], port %19s");
TCHAR szAltServer[100];
@@ -2281,7 +2281,7 @@ bool CIrcProto::OnIrc_SUPPORT( const CIrcMessage* pmsg )
return true;
}
-void CIrcProto::OnIrcDefault( const CIrcMessage* pmsg )
+void CIrcProto::OnIrcDefault(const CIrcMessage* pmsg)
{
ShowMessage( pmsg );
}
@@ -2304,7 +2304,7 @@ void CIrcProto::OnIrcDisconnected()
KillChatTimer( InitTimer );
KillChatTimer( IdentTimer );
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp, ID_STATUS_OFFLINE);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, ID_STATUS_OFFLINE);
CMString sDisconn = _T("\0035\002");
sDisconn += TranslateT("*Disconnected*");
@@ -2366,7 +2366,7 @@ bool CIrcProto::DoOnConnect( const CIrcMessage* )
int Temp = m_iStatus;
m_iStatus = ID_STATUS_ONLINE;
- ProtoBroadcastAck( m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, ( HANDLE )Temp, m_iStatus );
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, ( HANDLE )Temp, m_iStatus );
if ( m_iDesiredStatus == ID_STATUS_AWAY )
PostIrcMessage( _T("/AWAY %s"), m_statusMessage.Mid(0,450).c_str());
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index 10b60b0194..fb1c5eba4e 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -565,13 +565,12 @@ struct AckBasicSearchParam
void __cdecl CIrcProto::AckBasicSearch( void* param )
{
- PROTOSEARCHRESULT psr = { 0 };
- psr.cbSize = sizeof(psr);
+ PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.id = (( AckBasicSearchParam* )param )->buf;
psr.nick = (( AckBasicSearchParam* )param )->buf;
- ProtoBroadcastAck( m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
- ProtoBroadcastAck( m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
delete param;
}
@@ -808,18 +807,18 @@ struct TFakeAckParam
void __cdecl CIrcProto::AckMessageFail(void *info)
{
- ProtoBroadcastAck(m_szModuleName, info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
+ ProtoBroadcastAck( info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
}
void __cdecl CIrcProto::AckMessageFailDcc(void *info)
{
- ProtoBroadcastAck(m_szModuleName, info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
+ ProtoBroadcastAck( info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
}
void __cdecl CIrcProto::AckMessageSuccess(void *info)
{
TFakeAckParam *param = (TFakeAckParam*)info;
- ProtoBroadcastAck(m_szModuleName, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)param->msgid, 0);
+ ProtoBroadcastAck( param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)param->msgid, 0);
delete param;
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 8135f9fa36..f0d49fc8a1 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -1082,7 +1082,7 @@ void __cdecl CIrcProto::ConnectServerThread( void* )
int Temp = m_iStatus;
m_iStatus = ID_STATUS_CONNECTING;
nickflag = true;
- ProtoBroadcastAck(m_szModuleName,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp,ID_STATUS_CONNECTING);
+ ProtoBroadcastAck(NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp,ID_STATUS_CONNECTING);
Sleep(100);
EnterCriticalSection(&cs);
Connect(si);
@@ -1098,8 +1098,8 @@ void __cdecl CIrcProto::ConnectServerThread( void* )
else {
Temp = m_iDesiredStatus;
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NONETWORK );
- ProtoBroadcastAck(m_szModuleName,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp,ID_STATUS_OFFLINE);
+ ProtoBroadcastAck( NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NONETWORK );
+ ProtoBroadcastAck(NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)Temp,ID_STATUS_OFFLINE);
Sleep(100);
} }
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp
index 354f8aec0e..6d145c999a 100644
--- a/protocols/IRCG/src/windows.cpp
+++ b/protocols/IRCG/src/windows.cpp
@@ -157,7 +157,7 @@ void CWhoisDlg::OnVersion( CCtrlButton* )
m_proto->PostIrcMessage( _T("/PRIVMSG %s \001VERSION\001"), szTemp);
}
-void CWhoisDlg::ShowMessage( const CIrcMessage* pmsg )
+void CWhoisDlg::ShowMessage(const CIrcMessage* pmsg)
{
if ( m_InfoNick.SendMsg( CB_FINDSTRINGEXACT, -1, (LPARAM) pmsg->parameters[1].c_str()) == CB_ERR)
m_InfoNick.SendMsg( CB_ADDSTRING, 0, (LPARAM) pmsg->parameters[1].c_str());
@@ -182,7 +182,7 @@ void CWhoisDlg::ShowMessage( const CIrcMessage* pmsg )
InvalidateRect( m_hwnd, NULL, TRUE);
}
-void CWhoisDlg::ShowMessageNoUser( const CIrcMessage* pmsg )
+void CWhoisDlg::ShowMessageNoUser(const CIrcMessage* pmsg)
{
m_InfoNick.SetText( pmsg->parameters[2].c_str());
m_InfoNick.SendMsg( CB_SETEDITSEL, 0,MAKELPARAM(0,-1));
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp
index 9ca0b135e5..85f49b4d4d 100644
--- a/protocols/MRA/src/MraAvatars.cpp
+++ b/protocols/MRA/src/MraAvatars.cpp
@@ -123,7 +123,7 @@ void CMraProto::MraAvatarsQueueClear(HANDLE hAvatarsQueueHandle)
while (FifoMTItemPop(pmraaqAvatarsQueue, NULL, (LPVOID*)&pmraaqiAvatarsQueueItem) == NO_ERROR) {
pai.hContact = pmraaqiAvatarsQueueItem->hContact;
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0);
mir_free(pmraaqiAvatarsQueueItem);
}
}
@@ -220,12 +220,12 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
*lpszDomain = 0;
lpszDomain++;
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_CONNECTING, NULL, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_CONNECTING, NULL, 0);
if (hConnection == NULL)
hConnection = MraAvatarsHttpConnect(pmraaqAvatarsQueue->hNetlibUser, szServer, dwServerPort);
if (hConnection) {
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_CONNECTED, NULL, 0);
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_SENTREQUEST, NULL, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_CONNECTED, NULL, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_SENTREQUEST, NULL, 0);
if ( !MraAvatarsHttpTransaction(hConnection, REQUEST_HEAD, lpszUser, lpszDomain, szServer, MAHTRO_AVTMRIM, bUseKeepAliveConn, &dwResultCode, &bKeepAlive, &dwAvatarFormat, &dwAvatarSizeServer, &itAvatarLastModifiedTimeServer)) {
switch (dwResultCode) {
case 200:
@@ -236,7 +236,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
if ((*((DWORDLONG*)&ftLastModifiedTimeServer)) != (*((DWORDLONG*)&ftLastModifiedTimeLocal)))
{// need check for update
bDownloadNew = TRUE;
- //ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, 0, 0);
+ //ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, 0, 0);
}
else {// avatar is valid
if (MraAvatarsGetFileName(pmraaqAvatarsQueue, pmraaqiAvatarsQueueItem->hContact, dwAvatarFormat, wszFileName, SIZEOF(wszFileName), NULL) == NO_ERROR) {
@@ -278,7 +278,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
hConnection = MraAvatarsHttpConnect(pmraaqAvatarsQueue->hNetlibUser, szServer, dwServerPort);
if (hConnection) {
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_DATA, NULL, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_DATA, NULL, 0);
if (MraAvatarsHttpTransaction(hConnection, REQUEST_GET, lpszUser, lpszDomain, szServer, MAHTRO_AVT, bUseKeepAliveConn, &dwResultCode, &bKeepAlive, &dwAvatarFormat, &dwAvatarSizeServer, &itAvatarLastModifiedTimeServer) == NO_ERROR && dwResultCode == 200) {
if (bDefaultAvt)
dwAvatarFormat = PA_FORMAT_DEFAULT;
@@ -344,7 +344,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
pai.hContact = pmraaqiAvatarsQueueItem->hContact;
pai.format = PA_FORMAT_UNKNOWN;
pai.filename[0] = 0;
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0);
}
else {
pai.hContact = pmraaqiAvatarsQueueItem->hContact;
@@ -361,7 +361,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
if ( pmraaqiAvatarsQueueItem->hContact == NULL) // proto avatar
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
- ProtoBroadcastAck(m_szModuleName, pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
+ ProtoBroadcastAck(pmraaqiAvatarsQueueItem->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
}
mir_free(pmraaqiAvatarsQueueItem);
}
@@ -642,7 +642,7 @@ DWORD CMraProto::MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWOR
if (hContact == NULL)
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
}
return dwRetCode;
}
diff --git a/protocols/MRA/src/MraFilesQueue.cpp b/protocols/MRA/src/MraFilesQueue.cpp
index d4c05f9e04..8ab83d4a6c 100644
--- a/protocols/MRA/src/MraFilesQueue.cpp
+++ b/protocols/MRA/src/MraFilesQueue.cpp
@@ -411,7 +411,7 @@ BOOL CMraProto::MraFilesQueueHandCheck(HANDLE hConnection, MRA_FILES_QUEUE_ITEM
dwBuffSize = mir_snprintf((LPSTR)btBuff, SIZEOF(btBuff), "%s %s", MRA_FT_HELLO, szEMailMy)+1;
if (dwBuffSize == Netlib_Send(hConnection, (LPSTR)btBuff, (int)dwBuffSize, 0))
{// my email sended
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0);
dwBuffSize = Netlib_Recv(hConnection, (LPSTR)btBuff, sizeof(btBuff), 0);
if ((dwEMailSize+sizeof(MRA_FT_HELLO)+1) == dwBuffSize)
{// email received
@@ -424,7 +424,7 @@ BOOL CMraProto::MraFilesQueueHandCheck(HANDLE hConnection, MRA_FILES_QUEUE_ITEM
dwBuffSize = Netlib_Recv(hConnection, (LPSTR)btBuff, sizeof(btBuff), 0);
if ((dwEMailSize+sizeof(MRA_FT_HELLO)+1) == dwBuffSize)
{// email received
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0);
mir_snprintf(((LPSTR)btBuff+dwBuffSize), (SIZEOF(btBuff)-dwBuffSize), "%s %s", MRA_FT_HELLO, szEMail);
if (CompareStringA( MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, (LPSTR)btBuff, dwBuffSize, ((LPSTR)btBuff+dwBuffSize), dwBuffSize) == CSTR_EQUAL)
{// email verified
@@ -482,7 +482,7 @@ HANDLE CMraProto::MraFilesQueueConnectOut(MRA_FILES_QUEUE_ITEM *dat)
// Set up the sockaddr structure
for (size_t i = 0;i<dat->malAddrList.dwAddrCount;i++) {
if (dwLocalPort == dat->malAddrList.pmaliAddress[i].dwPort || bFiltering == FALSE) {
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)dat->dwIDRequest, 0);
nloc.szHost = inet_ntoa((*((in_addr*)&dat->malAddrList.pmaliAddress[i].dwAddr)));
nloc.wPort = (WORD)dat->malAddrList.pmaliAddress[i].dwPort;
@@ -494,7 +494,7 @@ HANDLE CMraProto::MraFilesQueueConnectOut(MRA_FILES_QUEUE_ITEM *dat)
while (--dwCurConnectReTryCount && dat->hConnection == NULL);
if (dat->hConnection) {
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
if (MraFilesQueueHandCheck(dat->hConnection, dat)) {
// связь установленная с тем кем нужно
mraSetDword(dat->hContact, "OldIP", mraGetDword(dat->hContact, "IP", 0));
@@ -553,7 +553,7 @@ HANDLE CMraProto::MraFilesQueueConnectIn(MRA_FILES_QUEUE_ITEM *dat)
dat->hListen = (HANDLE)CallService(MS_NETLIB_BINDPORT, (WPARAM)hNetlibUser, (LPARAM)&nlbBind);
if (dat->hListen) {
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, (HANDLE)dat->dwIDRequest, 0);
dwAddrListSize = MraFilesQueueGetLocalAddressesList(szAddrList, sizeof(szAddrList), nlbBind.wPort);
}
// не смогли слушать порт, хз почему.
@@ -786,12 +786,12 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter)
}else {
if (InterlockedExchangeAdd((volatile LONG*)&dat->bIsWorking, 0))
{
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKRESULT_CONNECTPROXY, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKRESULT_CONNECTPROXY, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
if (MraMrimProxyConnect(dat->hMraMrimProxyData, &dat->hConnection) == NO_ERROR)
{// подключились к прокси, проверяем та ли сессия (ещё раз, на этот раз сами)
if (MraFilesQueueHandCheck(dat->hConnection, dat))
{// связь установленная с тем кем нужно// dat->bSending
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
bConnected = TRUE;
}
}
@@ -823,9 +823,9 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter)
}
//***deb add
- //dwBuffSizeUsed = ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
+ //dwBuffSizeUsed = ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, (HANDLE)dat->dwIDRequest, 0);
//dwBuffSizeUsed = (mir_snprintf((LPSTR)btBuff, SIZEOF(btBuff), "%s %S", MRA_FT_GET_FILE, dat->pmfqfFiles[i].lpwszName)+1);
memmove(btBuff, MRA_FT_GET_FILE, sizeof(MRA_FT_GET_FILE));
@@ -856,7 +856,7 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter)
dwUpdateTimeNext = GetTickCount();
nls.dwTimeout = (1000*mraGetDword(NULL, "TimeOutReceiveFileData", MRA_DEF_FS_TIMEOUT_RECV));
nls.hReadConns[0] = dat->hConnection;
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
while (bContinue)
{
@@ -885,7 +885,7 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter)
if (dwUpdateTimeNext <= dwUpdateTimeCur || pfts.currentFileProgress >= dat->pmfqfFiles[i].dwSize)
{// we update it
dwUpdateTimeNext = dwUpdateTimeCur+MRA_FILES_QUEUE_PROGRESS_INTERVAL;
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
if (pfts.currentFileProgress >= dat->pmfqfFiles[i].dwSize)
{// file received
@@ -942,9 +942,9 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter)
if (mraGetStaticStringA(dat->hContact, "e-mail", szEMail, SIZEOF(szEMail), &dwEMailSize))
MraFileTransferAck(FILE_TRANSFER_STATUS_ERROR, szEMail, dwEMailSize, dat->dwIDRequest, NULL, 0);
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dat->dwIDRequest, 0);
}
- else ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, (HANDLE)dat->dwIDRequest, 0);
+ else ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, (HANDLE)dat->dwIDRequest, 0);
mt_lock l(pmrafqFilesQueue);
MraFilesQueueItemFree(dat);
@@ -1044,12 +1044,12 @@ void CMraProto::MraFilesQueueSendThreadProc(LPVOID lpParameter)
bConnected = TRUE;
else {
if (InterlockedExchangeAdd((volatile LONG*)&dat->bIsWorking, 0)) {
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKRESULT_CONNECTPROXY, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKRESULT_CONNECTPROXY, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
if (MraMrimProxyConnect(dat->hMraMrimProxyData, &dat->hConnection) == NO_ERROR) {
// подключились к прокси, проверяем та ли сессия (ещё раз, на этот раз сами)
if (MraFilesQueueHandCheck(dat->hConnection, dat)) {
// связь установленная с тем кем нужно// dat->bSending
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dat->dwIDRequest, 0);
bConnected = TRUE;
}
}
@@ -1059,7 +1059,7 @@ void CMraProto::MraFilesQueueSendThreadProc(LPVOID lpParameter)
if (bConnected) { // email verified
bFailed = FALSE;
for (i = 0; i < dat->dwFilesCount; i++) { // sending files
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, (HANDLE)dat->dwIDRequest, 0);
dwBuffSizeUsed = 0;
while (TRUE) {
@@ -1107,7 +1107,7 @@ void CMraProto::MraFilesQueueSendThreadProc(LPVOID lpParameter)
//pfts.currentFileTime; //as seconds since 1970
WideCharToMultiByte(MRA_CODE_PAGE, 0, dat->pmfqfFiles[j].lpwszName, dat->pmfqfFiles[j].dwNameLen, szFileName, SIZEOF(szFileName), NULL, NULL);
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
while (TRUE) { // read and sending
if (ReadFile(hFile, btBuff, dwSendBlockSize, (DWORD*)&dwBuffSizeUsed, NULL)) {
@@ -1121,7 +1121,7 @@ void CMraProto::MraFilesQueueSendThreadProc(LPVOID lpParameter)
if (dwUpdateTimeNext <= dwUpdateTimeCur || pfts.currentFileProgress >= dat->pmfqfFiles[j].dwSize) { // we update it
dwUpdateTimeNext = dwUpdateTimeCur+MRA_FILES_QUEUE_PROGRESS_INTERVAL;
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_DATA, (HANDLE)dat->dwIDRequest, (LPARAM)&pfts);
if (pfts.currentFileProgress >= dat->pmfqfFiles[j].dwSize) { // file received
bOK = TRUE;
@@ -1187,9 +1187,9 @@ void CMraProto::MraFilesQueueSendThreadProc(LPVOID lpParameter)
if (mraGetStaticStringA(dat->hContact, "e-mail", szEMail, SIZEOF(szEMail), &dwEMailSize))
MraFileTransferAck(FILE_TRANSFER_STATUS_ERROR, szEMail, dwEMailSize, dat->dwIDRequest, NULL, 0);
- ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dat->dwIDRequest, 0);
+ ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dat->dwIDRequest, 0);
}
- else ProtoBroadcastAck(m_szModuleName, dat->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, (HANDLE)dat->dwIDRequest, 0);
+ else ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, (HANDLE)dat->dwIDRequest, 0);
mt_lock l(pmrafqFilesQueue);
MraFilesQueueItemFree(dat);
diff --git a/protocols/MRA/src/MraMRIMProxy.cpp b/protocols/MRA/src/MraMRIMProxy.cpp
index 88c4570f54..ebb4bfc722 100644
--- a/protocols/MRA/src/MraMRIMProxy.cpp
+++ b/protocols/MRA/src/MraMRIMProxy.cpp
@@ -123,7 +123,7 @@ DWORD CMraProto::MraMrimProxyConnect(HANDLE hMraMrimProxyData, HANDLE *phConnect
// через https прокси только 443 порт
if ((pmmpd->malAddrList.pmaliAddress[i].dwPort == MRA_SERVER_PORT_HTTPS && bIsHTTPSProxyUsed) || bIsHTTPSProxyUsed == FALSE) {
if (pmmpd->dwDataType == MRIM_PROXY_TYPE_FILES)
- ProtoBroadcastAck(m_szModuleName, MraHContactFromEmail(pmmpd->lpszEMail, pmmpd->dwEMailSize, FALSE, TRUE, NULL), ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)pmmpd->dwIDRequest, 0);
+ ProtoBroadcastAck(MraHContactFromEmail(pmmpd->lpszEMail, pmmpd->dwEMailSize, FALSE, TRUE, NULL), ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)pmmpd->dwIDRequest, 0);
nloc.szHost = inet_ntoa((*((in_addr*)&pmmpd->malAddrList.pmaliAddress[i].dwAddr)));
nloc.wPort = (WORD)pmmpd->malAddrList.pmaliAddress[i].dwPort;
@@ -142,7 +142,7 @@ DWORD CMraProto::MraMrimProxyConnect(HANDLE hMraMrimProxyData, HANDLE *phConnect
dwRcvBuffSizeUsed = 0;
if (pmmpd->dwDataType == MRIM_PROXY_TYPE_FILES)
- ProtoBroadcastAck(m_szModuleName, MraHContactFromEmail(pmmpd->lpszEMail, pmmpd->dwEMailSize, FALSE, TRUE, NULL), ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)pmmpd->dwIDRequest, 0);
+ ProtoBroadcastAck(MraHContactFromEmail(pmmpd->lpszEMail, pmmpd->dwEMailSize, FALSE, TRUE, NULL), ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)pmmpd->dwIDRequest, 0);
MraSendPacket(nls.hReadConns[0], 0, MRIM_CS_PROXY_HELLO, &pmmpd->mguidSessionID, sizeof(MRA_GUID));
while (bContinue) {
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index f8d847fae8..72cd7feb68 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -629,7 +629,7 @@ int CMraProto::SetStatus(int iNewStatus)
}
}
MraSetContactStatus(NULL, m_iStatus);
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)dwOldStatusMode, m_iStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)dwOldStatusMode, m_iStatus);
return 0;
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 82dbb828d4..97f6eb3a5c 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -1106,7 +1106,7 @@ DWORD CMraProto::MraCommandDispatcher(mrim_packet_header_t *pmaHeader, DWORD *pd
szLastName[dwStringSize] = 0;
}
}// end for
- ProtoBroadcastAck(m_szModuleName, hContact, dwAckType, ACKRESULT_DATA, (HANDLE)pmaHeader->seq, (LPARAM)&psr);
+ ProtoBroadcastAck(hContact, dwAckType, ACKRESULT_DATA, (HANDLE)pmaHeader->seq, (LPARAM)&psr);
}
}// end while
diff --git a/protocols/Omegle/src/connection.cpp b/protocols/Omegle/src/connection.cpp
index b098e81fad..03f74ce9b0 100644
--- a/protocols/Omegle/src/connection.cpp
+++ b/protocols/Omegle/src/connection.cpp
@@ -32,7 +32,7 @@ void OmegleProto::SignOn(void*)
int old_status = m_iStatus;
m_iStatus = m_iDesiredStatus;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
setDword( "LogonTS", (DWORD)time(NULL));
ClearChat();
@@ -57,7 +57,7 @@ void OmegleProto::SignOff(void*)
deleteSetting( "LogonTS" );
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
//SetAllContactStatuses( ID_STATUS_OFFLINE );
//ToggleStatusMenuItems(false);
diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp
index b9daff52ad..8214b33483 100644
--- a/protocols/Tlen/src/jabber_svc.cpp
+++ b/protocols/Tlen/src/jabber_svc.cpp
@@ -400,7 +400,7 @@ int __cdecl TlenProtocol::SetStatus(int iNewStatus)
if (m_iStatus != ID_STATUS_OFFLINE) {
oldStatus = m_iStatus;
m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, m_iStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
}
}
}
@@ -412,7 +412,7 @@ int __cdecl TlenProtocol::SetStatus(int iNewStatus)
oldStatus = m_iStatus;
// send presence update
JabberSendPresence(this, iNewStatus);
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, m_iStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, m_iStatus);
}
}
return 0;
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index 27c46541e3..b0111012e1 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -234,12 +234,12 @@ bool TwitterProto::NegotiateConnection()
LOG( _T("**NegotiateConnection - We don't have a PIN? this doesn't make sense. Resetting OAuth keys and setting offline."));
resetOAuthKeys();
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
// Set to offline
old_status = m_iStatus;
m_iDesiredStatus = m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
return false;
}
@@ -261,12 +261,12 @@ bool TwitterProto::NegotiateConnection()
resetOAuthKeys();
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
// Set to offline
old_status = m_iStatus;
m_iDesiredStatus = m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
return false;
}
@@ -337,19 +337,19 @@ bool TwitterProto::NegotiateConnection()
LOG( _T("**NegotiateConnection - Verifying credentials failed! No internet maybe?"));
//resetOAuthKeys();
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_FAILED,(HANDLE)old_status,m_iStatus);
// Set to offline
old_status = m_iStatus;
m_iDesiredStatus = m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
return false;
}
else {
m_iStatus = m_iDesiredStatus;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
return true;
}
}
@@ -458,10 +458,10 @@ void TwitterProto::UpdateAvatarWorker(void *p)
if(save_url(hAvatarNetlib_,data->url,filename))
{
db_set_s(data->hContact,m_szModuleName,TWITTER_KEY_AV_URL,data->url.c_str());
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_AVATAR,ACKRESULT_SUCCESS,&ai,0);
+ ProtoBroadcastAck(data->hContact,ACKTYPE_AVATAR,ACKRESULT_SUCCESS,&ai,0);
}
else
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_AVATAR,ACKRESULT_FAILED, &ai,0);
+ ProtoBroadcastAck(data->hContact,ACKTYPE_AVATAR,ACKRESULT_FAILED, &ai,0);
ReleaseMutex(avatar_lock_);
LOG( _T("***** Done avatar: %s"),data->url.c_str());
}
@@ -482,7 +482,7 @@ void TwitterProto::UpdateAvatar(HANDLE hContact,const std::string &url,bool forc
PROTO_AVATAR_INFORMATIONT ai = {sizeof(ai),hContact};
db_set_s(hContact,m_szModuleName,TWITTER_KEY_AV_URL,url.c_str());
- ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AVATAR,ACKRESULT_SUCCESS,&ai,0);
+ ProtoBroadcastAck(hContact,ACKTYPE_AVATAR,ACKRESULT_SUCCESS,&ai,0);
}
else
{
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index f5568c9a9a..00dd6c66a8 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -74,7 +74,7 @@ void TwitterProto::UpdateInfoWorker(void *hContact)
}
UpdateAvatar(hContact,user.profile_image_url,true);
- ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_GETINFO,ACKRESULT_SUCCESS,0,0);
+ ProtoBroadcastAck(hContact,ACKTYPE_GETINFO,ACKRESULT_SUCCESS,0,0);
}
int TwitterProto::GetInfo(HANDLE hContact,int info_type)
@@ -136,15 +136,15 @@ void TwitterProto::DoSearch(void *p)
psr.nick = mir_a2t(info.username. c_str());
psr.firstName = mir_a2t(info.real_name.c_str());
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_SEARCH,ACKRESULT_DATA,(HANDLE)1, (LPARAM)&psr);
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_SEARCH,ACKRESULT_SUCCESS,(HANDLE)1,0);
+ ProtoBroadcastAck(0,ACKTYPE_SEARCH,ACKRESULT_DATA,(HANDLE)1, (LPARAM)&psr);
+ ProtoBroadcastAck(0,ACKTYPE_SEARCH,ACKRESULT_SUCCESS,(HANDLE)1,0);
mir_free(psr.nick);
mir_free(psr.firstName);
}
else
{
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_SEARCH,ACKRESULT_SUCCESS,(HANDLE)1,0);
+ ProtoBroadcastAck(0,ACKTYPE_SEARCH,ACKRESULT_SUCCESS,(HANDLE)1,0);
}
delete query;
@@ -171,10 +171,10 @@ void TwitterProto::GetAwayMsgWorker(void *hContact)
DBVARIANT dbv;
if( !db_get_ts(hContact,"CList","StatusMsg",&dbv)) {
- ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_SUCCESS, (HANDLE)1,(LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(hContact,ACKTYPE_AWAYMSG,ACKRESULT_SUCCESS, (HANDLE)1,(LPARAM)dbv.ptszVal);
db_free(&dbv);
}
- else ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_FAILED, (HANDLE)1,0);
+ else ProtoBroadcastAck(hContact,ACKTYPE_AWAYMSG,ACKRESULT_FAILED, (HANDLE)1,0);
}
HANDLE TwitterProto::GetAwayMsg(HANDLE hContact)
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 105210bf4d..d39ba23371 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -152,7 +152,7 @@ void TwitterProto::SendSuccess(void *p)
ScopedLock s(twitter_lock_);
twit_.send_direct(dbv.pszVal,data->msg);
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS,(HANDLE)data->msgid,0);
+ ProtoBroadcastAck(data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS,(HANDLE)data->msgid,0);
db_free(&dbv);
}
@@ -203,7 +203,7 @@ int TwitterProto::SetStatus(int new_status)
// i think here we tell the proto interface struct that we're connecting, just so it knows
m_iStatus = ID_STATUS_CONNECTING;
// ok.. here i think we're telling the core that this protocol something.. but why?
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
ForkThread(&TwitterProto::SignOn,this);
}
@@ -213,7 +213,7 @@ int TwitterProto::SetStatus(int new_status)
m_iStatus = m_iDesiredStatus;
SetAllContactStatuses(ID_STATUS_OFFLINE);
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
}
return 0;
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp
index 856e04b282..bfd8743ebe 100644
--- a/protocols/Yahoo/src/avatar.cpp
+++ b/protocols/Yahoo/src/avatar.cpp
@@ -168,7 +168,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt)
return;
}
- // ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ // ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
LOG(("yahoo_recv_avatarthread who:%s url:%s checksum: %d", avt->who, avt->pic_url, avt->cksum));
@@ -254,7 +254,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt)
if (error)
SetDword(hContact, "PictCK", 0);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, !error ? ACKRESULT_SUCCESS:ACKRESULT_FAILED,(HANDLE) &AI, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, !error ? ACKRESULT_SUCCESS:ACKRESULT_FAILED,(HANDLE) &AI, 0);
}
void CYahooProto::ext_got_picture(const char *me, const char *who, const char *pic_url, int cksum, int type)
@@ -577,7 +577,7 @@ void CYahooProto::reset_avatar(HANDLE hContact)
{
LOG(("[YAHOO_RESET_AVATAR]"));
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
void CYahooProto::request_avatar(const char* who)
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp
index 46acda427b..999ef0c3a6 100644
--- a/protocols/Yahoo/src/file_transfer.cpp
+++ b/protocols/Yahoo/src/file_transfer.cpp
@@ -177,11 +177,11 @@ static void upload_file(int id, int fd, int error, void *data)
LOG(("proto: %s, hContact: %p", sf->ppro->m_szModuleName, sf->hContact));
LOG(("Sending file: %s", fi->filename));
- //ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
- //ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, sf, 0);
+ //ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
+ //ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, sf, 0);
ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, sf, 0);
- //ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_SENTREQUEST, sf, 0);
- //ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, sf, 0);
+ //ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_SENTREQUEST, sf, 0);
+ //ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, sf, 0);
do {
ReadFile(myhFile, buf, sizeof(buf), &dw, NULL);
@@ -465,7 +465,7 @@ void __cdecl CYahooProto::recv_filethread(void *psf)
y_filetransfer *sf = ( y_filetransfer* )psf;
struct yahoo_file_info *fi = (struct yahoo_file_info *)sf->files->data;
- ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
+ ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
DebugLog("[yahoo_recv_filethread] who: %s, msg: %s, filename: %s ", sf->who, sf->msg, fi->filename);
@@ -597,7 +597,7 @@ void CYahooProto::ext_got_file7info(const char *me, const char *who, const char
return;
}
- ProtoBroadcastAck(m_szModuleName, ft->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
FREE(ft->url);
@@ -681,7 +681,7 @@ void __cdecl CYahooProto::send_filethread(void *psf)
y_filetransfer *sf = s->sf;
struct yahoo_file_info *fi = (struct yahoo_file_info *)sf->files->data;
- ProtoBroadcastAck(m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
+ ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
LOG(("who %s, msg: %s, filename: %s filesize: %ld", sf->who, sf->msg, fi->filename, fi->filesize));
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 928595c61c..44bd39be16 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -156,20 +156,20 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons
void __cdecl CYahooProto::im_sendacksuccess(HANDLE hContact)
{
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
void __cdecl CYahooProto::im_sendackfail(HANDLE hContact)
{
SleepEx(1000, TRUE);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 1,
+ ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 1,
(LPARAM) Translate("The message send timed out."));
}
void __cdecl CYahooProto::im_sendackfail_longmsg(HANDLE hContact)
{
SleepEx(1000, TRUE);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 1,
+ ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 1,
(LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars"));
}
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index 1270da32e2..fd6344131a 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -340,7 +340,7 @@ DWORD_PTR __cdecl CYahooProto::GetCaps( int type, HANDLE /*hContact*/ )
void __cdecl CYahooProto::get_info_thread(HANDLE hContact)
{
SleepEx(500, TRUE);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
int __cdecl CYahooProto::GetInfo( HANDLE hContact, int /*infoType*/ )
@@ -452,7 +452,7 @@ int __cdecl CYahooProto::SetStatus( int iNewStatus )
err++;
db_free(&dbv);
} else {
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
err++;
}
@@ -468,7 +468,7 @@ int __cdecl CYahooProto::SetStatus( int iNewStatus )
db_free(&dbv);
} else {
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
err++;
}
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index 7fd2849380..8fbe741255 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -73,7 +73,7 @@ void CYahooProto::BroadcastStatus(int s)
DebugLog("[yahoo_util_broadcaststatus] Old Status: %s (%d), New Status: %s (%d)",
NEWSTR_ALLOCA((char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, oldStatus, 0)), oldStatus,
NEWSTR_ALLOCA((char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, m_iStatus, 0)), m_iStatus);
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, (LPARAM)m_iStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, (LPARAM)m_iStatus);
}
//=======================================================
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index e0bd6f5e34..e3d6f0405f 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -1124,22 +1124,22 @@ void CYahooProto::ext_login_response(int succ, const char *url)
if (succ == YAHOO_LOGIN_UNAME) {
mir_sntprintf(buff, SIZEOF(buff), TranslateT("Could not log into Yahoo service - username not recognised. Please verify that your username is correctly typed."));
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
}
else if (succ == YAHOO_LOGIN_PASSWD) {
mir_sntprintf(buff, SIZEOF(buff), TranslateT("Could not log into Yahoo service - password incorrect. Please verify that your username and password are correctly typed."));
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
}
else if (succ == YAHOO_LOGIN_LOCK) {
mir_sntprintf(buff, SIZEOF(buff), TranslateT("Could not log into Yahoo service. Your account has been locked.\nVisit %s to reactivate it."), url);
}
else if (succ == YAHOO_LOGIN_DUPL) {
mir_sntprintf(buff, SIZEOF(buff), TranslateT("You have been logged out of the yahoo service, possibly due to a duplicate login."));
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
}
else if (succ == YAHOO_LOGIN_LOGOFF) {
//mir_sntprintf(buff, SIZEOF(buff), TranslateT("You have been logged out of the yahoo service."));
- //ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
+ //ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
return; // we logged out.. so just sign-off..
}
else if (succ == -1) {