diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-22 20:10:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-22 20:10:30 +0300 |
commit | 3285170a72a34d78e178b2b8117a3622f3a1840a (patch) | |
tree | 58d5f504291c9aecd459649561d592f76830cbd2 /plugins/New_GPG/src/messages.cpp | |
parent | 16087f54b7d594d867864ffc731f2ba7633a1610 (diff) |
temporary hidden setting to suppress sending back error messages
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 1eb4f942eb..cbf7c397b1 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -155,11 +155,7 @@ static void RecvMsgSvc_func(RecvParams *param) boost::filesystem::remove(path, e); } HistoryLog(hContact, db_event(param->msg, param->timestamp, 0, dbflags)); - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); delete param; return; } @@ -182,11 +178,7 @@ static void RecvMsgSvc_func(RecvParams *param) if (globals.debuglog) globals.debuglog << "info: failed to decrypt messaage from " + szScreenName + " password needed, trying to get one"; if (globals._terminate) { - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); break; } { //save inkey id @@ -216,11 +208,7 @@ static void RecvMsgSvc_func(RecvParams *param) } HistoryLog(hContact, db_event(param->msg, param->timestamp, 0, dbflags)); - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); delete param; return; } @@ -243,11 +231,7 @@ static void RecvMsgSvc_func(RecvParams *param) } HistoryLog(hContact, db_event(param->msg, param->timestamp, 0, dbflags)); - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); delete param; return; } @@ -275,11 +259,7 @@ static void RecvMsgSvc_func(RecvParams *param) ptrA tmp4((char*)mir_alloc(sizeof(char)*(str1.length() + 1))); mir_strcpy(tmp4, str1.c_str()); HistoryLog(hContact, db_event(param->msg, param->timestamp, 0, dbflags)); - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); delete param; return; } @@ -315,11 +295,7 @@ static void RecvMsgSvc_func(RecvParams *param) globals.debuglog << "info: Failed to decrypt GPG encrypted message."; HistoryLog(hContact, db_event(param->msg, param->timestamp, 0, dbflags)); - BYTE enc = g_plugin.getByte(hContact, "GPGEncryption", 0); - g_plugin.setByte(hContact, "GPGEncryption", 0); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message"); - HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT)); - g_plugin.setByte(hContact, "GPGEncryption", enc); + SendErrorMessage(hContact); delete param; return; } |