#ifndef _stopspam_headers_h #define _stopspam_headers_h // disable security warnings about "*_s" functions #define _CRT_SECURE_NO_DEPRECATE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef std::wstring tstring; #define PREF_TCHAR2 PREF_UTF #include "version.h" #include "resource.h" #define MODULENAME LPGEN("StopSpam") #define DB_KEY_ANSWERED "Answered" #define DB_KEY_HASAUTH "HasAuth" #define DB_KEY_HASSENT "HasSent" #define DB_KEY_QUESTCOUNT "QuestionCount" struct CMPlugin : public PLUGIN { CMPlugin(); CMOption InfTalkProtection, AddPermanent, HandleAuthReq, AnswNotCaseSens, HistLog; CMOption Question, AuthRepl, Answer, Congratulation, AnswSplitString; CMOption DisabledProtoList; CMOption MaxQuestCount; const wchar_t* getQuestion(); const wchar_t* getReply(); const wchar_t* getCongrats(); bool ProtoDisabled(const char *proto) { std::string temp(proto); temp += ' '; return strstr(DisabledProtoList, temp.c_str()) != nullptr; } int Load() override; }; // utils tstring variables_parse(const wchar_t *tstrFormat, MCONTACT hContact); tstring trim(tstring const &tstr, tstring const &trimChars = L" \f\n\r\t\v"); INT_PTR IsContactPassed(WPARAM, LPARAM); int OnDbEventAdded(WPARAM, LPARAM); int OnDbEventFilterAdd(WPARAM, LPARAM); int OnOptInit(WPARAM, LPARAM); int OnShutdown(WPARAM, LPARAM); #endif