summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/commandmonitor.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
commit5e9e63c45e37917ffb0acd83832d0d8f99d01883 (patch)
tree1b674b85b1f582a13bd2a57ec73377b8989141bc /protocols/IRCG/src/commandmonitor.cpp
parent7105dcf75bdd939ca52ba045bc29c536c3f7ba49 (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/commandmonitor.cpp')
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp22
1 files changed, 7 insertions, 15 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)&pre;
+ 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"
}