From 385c6ad2482ae2b5dfbc0c8fa2046080db713995 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 3 Jan 2025 18:57:43 +0300 Subject: fixes #3679 (StopSpam: Jabber message query overflow) --- plugins/StopSpamPlus/src/stdafx.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'plugins/StopSpamPlus/src/stdafx.h') diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h index 75840d2c03..e4e3992f5b 100644 --- a/plugins/StopSpamPlus/src/stdafx.h +++ b/plugins/StopSpamPlus/src/stdafx.h @@ -8,17 +8,19 @@ #include #include #include +#include #include +#include #include #include -#include -#include -#include +#include #include +#include +#include +#include +#include #include -#include -#include #include @@ -39,10 +41,22 @@ struct CMPlugin : public PLUGIN { CMPlugin(); - CMOption InfTalkProtection, AddPermanent, HandleAuthReq, AnswNotCaseSens, HistLog; + struct Impl + { + Impl() : + timerAnswer(Miranda_GetSystemWindow(), UINT_PTR(this)) + { + timerAnswer.OnEvent = Callback(this, &Impl::OnTimer); + } + + CTimer timerAnswer; + void OnTimer(CTimer *); + } m_impl; + + CMOption bInfTalkProtection, bAddPermanent, bHandleAuthReq, bAnswNotCaseSens, bHistLog; CMOption Question, AuthRepl, Answer, Congratulation, AnswSplitString; CMOption DisabledProtoList; - CMOption MaxQuestCount; + CMOption iMaxQuestCount, iAnswerTimeout; const wchar_t* getQuestion(); const wchar_t* getReply(); @@ -55,6 +69,7 @@ struct CMPlugin : public PLUGIN } int Load() override; + int Unload() override; }; // utils -- cgit v1.2.3