summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-04 18:05:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-04 18:05:20 +0300
commita330def54d05bdf090f57829113c0079120e38fb (patch)
tree9c9db18eae0304e48ab968fffae2c5ed96ed411c /plugins/StopSpamPlus/src
parenta70fd8de566d88a4379dccf3b4080200c975fb44 (diff)
fixes #3679 completely
Diffstat (limited to 'plugins/StopSpamPlus/src')
-rw-r--r--plugins/StopSpamPlus/src/events.cpp7
-rw-r--r--plugins/StopSpamPlus/src/options.cpp4
-rw-r--r--plugins/StopSpamPlus/src/resource.h1
-rw-r--r--plugins/StopSpamPlus/src/stdafx.h2
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp1
5 files changed, 4 insertions, 11 deletions
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 2581e1f913..57fe106521 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -21,8 +21,7 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
// if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
if (!Contact::OnList(hContact) && !g_plugin.getByte(hContact, DB_KEY_ANSWERED) && !g_plugin.getByte(hContact, DB_KEY_HASSENT)) {
- if (!g_plugin.bHandleAuthReq)
- ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(variables_parse(g_plugin.getReply(), hContact).c_str())));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getReply(), hContact).c_str()));
if (g_plugin.iAnswerTimeout)
g_times[hContact] = time(0);
@@ -108,9 +107,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
else g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
// send congratulation
- char *buf = mir_utf8encodeW(variables_parse(g_plugin.getCongrats(), hContact).c_str());
- ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
- mir_free(buf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getCongrats(), hContact).c_str()));
// process the event
return 1;
diff --git a/plugins/StopSpamPlus/src/options.cpp b/plugins/StopSpamPlus/src/options.cpp
index 0eb3114c39..127288d49a 100644
--- a/plugins/StopSpamPlus/src/options.cpp
+++ b/plugins/StopSpamPlus/src/options.cpp
@@ -6,7 +6,7 @@ class COptMainDlg : public CDlgBase
{
CCtrlEdit edtDescr;
CCtrlSpin spinCount, spinTimeout;
- CCtrlCheck chk1, chk2, chk3, chk4, chk6;
+ CCtrlCheck chk1, chk2, chk4, chk6;
public:
COptMainDlg() :
@@ -16,7 +16,6 @@ public:
spinTimeout(this, IDC_SPIN2, 60),
chk1(this, ID_INFTALKPROT),
chk2(this, ID_ADDPERMANENT),
- chk3(this, ID_HANDLEAUTHREQ),
chk4(this, ID_NOTCASESENS),
chk6(this, ID_HISTORY_LOG)
{
@@ -25,7 +24,6 @@ public:
CreateLink(chk1, g_plugin.bInfTalkProtection);
CreateLink(chk2, g_plugin.bAddPermanent);
- CreateLink(chk3, g_plugin.bHandleAuthReq);
CreateLink(chk4, g_plugin.bAnswNotCaseSens);
CreateLink(chk6, g_plugin.bHistLog);
}
diff --git a/plugins/StopSpamPlus/src/resource.h b/plugins/StopSpamPlus/src/resource.h
index 82c2cd8694..aec5d198ba 100644
--- a/plugins/StopSpamPlus/src/resource.h
+++ b/plugins/StopSpamPlus/src/resource.h
@@ -16,7 +16,6 @@
#define ID_MAXQUESTCOUNT2 1009
#define ID_INFTALKPROT 1010
#define ID_ADDPERMANENT 1011
-#define ID_HANDLEAUTHREQ 1012
#define ID_NOTCASESENS 1013
#define ID_DIVIDER 1014
#define IDC_VARS 1015
diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h
index 306fed7531..66bbfb137c 100644
--- a/plugins/StopSpamPlus/src/stdafx.h
+++ b/plugins/StopSpamPlus/src/stdafx.h
@@ -55,7 +55,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
void OnTimer(CTimer *);
} m_impl;
- CMOption<bool> bInfTalkProtection, bAddPermanent, bHandleAuthReq, bAnswNotCaseSens, bHistLog;
+ CMOption<bool> bInfTalkProtection, bAddPermanent, bAnswNotCaseSens, bHistLog;
CMOption<wchar_t *> Question, AuthRepl, Answer, Congratulation, AnswSplitString;
CMOption<char *> DisabledProtoList;
CMOption<uint32_t> iMaxQuestCount, iAnswerTimeout;
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index fd6e3e8ebc..5e4d8482a1 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -27,7 +27,6 @@ CMPlugin::CMPlugin() :
DisabledProtoList(MODULENAME, "DisabledProtoList", "MetaContacts RSSNews"),
bInfTalkProtection(MODULENAME, "InfTalkProtection", 1),
bAddPermanent(MODULENAME, "AddPermanent", 0),
- bHandleAuthReq(MODULENAME, "HandleAuthReq", 0),
iMaxQuestCount(MODULENAME, "MaxQuestCount", 2),
iAnswerTimeout(MODULENAME, "AnswerTimeout", 5),
bAnswNotCaseSens(MODULENAME, "AnswNotCaseSens", 1),