From c2c8b96313665152d56efcb0f7bc6fa5888d6a59 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 1 Nov 2010 20:23:28 +0200 Subject: fixes --- messages.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index 92bdb78..6d502f4 100644 --- a/messages.cpp +++ b/messages.cpp @@ -142,6 +142,17 @@ int RecvMsgSvc(WPARAM w, LPARAM l) mir_free(tmp); } DBWriteContactSettingByte(hContact, szGPGModuleName, "bAlwatsTrust", 1); + void setSrmmIcon(HANDLE); + void setClistIcon(HANDLE); + setSrmmIcon(hContact); + setClistIcon(hContact); + if(metaIsSubcontact(hContact)) + { + setSrmmIcon(metaGetContact(hContact)); + setClistIcon(metaGetContact(hContact)); + HistoryLog(metaGetContact(hContact), "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, DBEF_READ); + } + HistoryLog(hContact, "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, 0); } } hcontact_data[hContact].msgs_to_ignore.push_back(msg); @@ -478,7 +489,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) { string str = pre->szMessage; mir_free((void**)pre->szMessage); - str.insert(0, "Received unencrypted message:\n"); + str.insert(0, "Failed to decrypt GPG encrypted message.\nReceived unencrypted message:\n"); debuglog<szMessage = mir_strdup(str.c_str()); return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs); @@ -515,9 +526,10 @@ int RecvMsgSvc(WPARAM w, LPARAM l) mir_free(msg); return 1; } - wstring str = toUTF16(msg); + string str = msg; mir_free((void**)pre->szMessage); - pre->szMessage = mir_strdup(toUTF8(str).c_str()); + str.insert(0, "Received unencrypted message:\n"); + pre->szMessage = mir_strdup(str.c_str()); return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs); } return CallService(MS_PROTO_CHAINRECV, w, l); -- cgit v1.2.3