diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 17:38:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 17:38:49 +0000 |
commit | 5e9e63c45e37917ffb0acd83832d0d8f99d01883 (patch) | |
tree | 1b674b85b1f582a13bd2a57ec73377b8989141bc /protocols/IRCG/src | |
parent | 7105dcf75bdd939ca52ba045bc29c536c3f7ba49 (diff) |
new macroses for MS_PROTO_CHAINRECV: ProtoChainRecv, ProtoChainRecvMsg & ProtoChainRecvFile
git-svn-id: http://svn.miranda-ng.org/main/trunk@2540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 22 | ||||
-rw-r--r-- | protocols/IRCG/src/irclib.cpp | 10 |
2 files changed, 8 insertions, 24 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 79d4579ae6..b176a01f00 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -705,11 +705,7 @@ bool CIrcProto::OnIrc_PRIVMSG( const CIrcMessage* pmsg ) bool bIsChannel = IsChannel(pmsg->parameters[0]);
if ( pmsg->m_bIncoming && !bIsChannel ) {
- CCSDATA ccs = {0};
- PROTORECVEVENT pre;
-
mess = DoColorCodes( mess.c_str(), TRUE, FALSE );
- ccs.szProtoService = PSR_MESSAGE;
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false};
@@ -723,14 +719,15 @@ bool CIrcProto::OnIrc_PRIVMSG( const CIrcMessage* pmsg ) return true;
}
- ccs.hContact = CList_AddContact( &user, false, true );
- ccs.lParam = (LPARAM)⪯
+ HANDLE hContact = CList_AddContact(&user, false, true);
+
+ PROTORECVEVENT pre;
pre.timestamp = (DWORD)time(NULL);
pre.flags = PREF_UTF;
pre.szMessage = mir_utf8encodeW( mess.c_str());
- setTString(ccs.hContact, "User", pmsg->prefix.sUser.c_str());
- setTString(ccs.hContact, "Host", pmsg->prefix.sHost.c_str());
- CallService( MS_PROTO_CHAINRECV, 0, (LPARAM) & ccs);
+ setTString(hContact, "User", pmsg->prefix.sUser.c_str());
+ setTString(hContact, "Host", pmsg->prefix.sHost.c_str());
+ ProtoChainRecvMsg(hContact, &pre);
mir_free( pre.szMessage );
return true;
}
@@ -1180,12 +1177,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg ) pre.fileCount = 1;
pre.ptszFiles = &tszTemp;
pre.lParam = (LPARAM)di;
-
- CCSDATA ccs = {0};
- ccs.szProtoService = PSR_FILE;
- ccs.hContact = hContact;
- ccs.lParam = (LPARAM) & pre;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ ProtoChainRecvFile(hContact, &pre);
} } }
// end type == "send"
}
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index c018b57a02..217861ba90 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -1368,18 +1368,10 @@ void CDccSession::DoChatReceive() if ( *pStart ) {
// send it off to some messaging module
-
PROTORECVEVENT pre = {0};
pre.timestamp = (DWORD)time(NULL);
-// pre.szMessage = (char*)DoColorCodes((TCHAR*)pStart, true, false); //!!!! // remove color codes
pre.szMessage = pStart;
-
- CCSDATA ccs = {0};
- ccs.szProtoService = PSR_MESSAGE;
- ccs.hContact = di->hContact;
- ccs.lParam = (LPARAM) ⪯
-
- CallService( MS_PROTO_CHAINRECV, 0, (LPARAM) & ccs);
+ ProtoChainRecvMsg(di->hContact, &pre);
}
cbInBuf -= pEnd - pStart;
|