diff options
Diffstat (limited to 'plugins/CmdLine/src/mimcmd_handlers.cpp')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 10caca7621..ad5a1cb216 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -742,7 +742,8 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re if (hContact) {
bShouldProcessAcks = TRUE;
- HANDLE hProcess = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(Utf8EncodeW(message)));
+ ptrA szMessage(Utf8EncodeW(message));
+ HANDLE hProcess = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, szMessage);
const int MAX_COUNT = 60;
int counter = 0;
while (((ack = GetAck(hProcess)) == nullptr) && (counter < MAX_COUNT)) {
@@ -759,10 +760,10 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re DBEVENTINFO e = {};
char module[128];
e.eventType = EVENTTYPE_MESSAGE;
- e.flags = DBEF_SENT;
+ e.flags = DBEF_SENT | DBEF_UTF;
- e.pBlob = (PBYTE)message;
- e.cbBlob = (DWORD)mir_strlen((char *)message) + 1;
+ e.pBlob = (PBYTE)szMessage.get();
+ e.cbBlob = (DWORD)mir_strlen(szMessage) + 1;
strncpy_s(module, ack->szModule, _countof(module));
e.szModule = module;
|