From 8c4ce511abdbfb4dba04e4f845e85c96c0471312 Mon Sep 17 00:00:00 2001 From: "Sergey (Elzor) Bolhovskoy" Date: Tue, 20 Jul 2010 18:02:26 +0600 Subject: add folders support, add options for spammers log and remove all tempory contacts, silent remove group, version bump --- init.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'init.cpp') diff --git a/init.cpp b/init.cpp index a028864..ab4c4e1 100644 --- a/init.cpp +++ b/init.cpp @@ -14,16 +14,18 @@ BOOL gbHideContacts = 1; BOOL gbIgnoreContacts = 0; BOOL gbExclude = 1; BOOL gbDelExcluded = 0; +BOOL gbDelAllTempory = 0; BOOL gbDosServiceIntegration = 0; BOOL gbCaseInsensitive = 0; BOOL gbInvisDisable = 0; BOOL gbIgnoreURL = 1; - +BOOL gbLogToFile=0; BOOL gbAutoAuth=0; BOOL gbAutoAddToServerList=0; BOOL gbAutoReqAuth=1; + +HANDLE hStopSpamLogDirH=0; -//BOOL gbDelNotInList = 0; tstring gbSpammersGroup = _T("Spammers"); tstring gbAutoAuthGroup = _T("NotSpammers"); @@ -50,7 +52,7 @@ UTF8_INTERFACE utfi; PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), 0, - PLUGIN_MAKE_VERSION(0, 0, 1, 8), + PLUGIN_MAKE_VERSION(0, 0, 1, 9), pluginDescription, "Roman Miklashevsky", "sss123next@list.ru", @@ -148,6 +150,7 @@ void InitVars() gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0); gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1); gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0); + gbDelAllTempory = DBGetContactSettingByte(NULL, pluginName, "DelAllTempory", 0); gbCaseInsensitive = DBGetContactSettingByte(NULL, pluginName, "CaseInsensitive", 0); gbInvisDisable = DBGetContactSettingByte(NULL, pluginName, "DisableInInvis", 0); gbIgnoreURL = DBGetContactSettingByte(NULL, pluginName, "IgnoreURL", 0); @@ -155,9 +158,8 @@ void InitVars() gbAutoAuth=DBGetContactSettingByte(NULL, pluginName, "AutoAuth", 0); gbAutoAddToServerList=DBGetContactSettingByte(NULL, pluginName, "AutoAddToServerList", 0); gbAutoReqAuth=DBGetContactSettingByte(NULL, pluginName, "AutoReqAuth", 0); + gbLogToFile=DBGetContactSettingByte(NULL, pluginName, "LogSpamToFile", 0); - -// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0); } static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam) @@ -169,6 +171,14 @@ static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam) InitVars(); if(gbDelExcluded) RemoveExcludedUsers(); + if(gbDelAllTempory) + RemoveTmp(0,0); + // Folders plugin support + if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) + { + hStopSpamLogDirH = (HANDLE) FoldersRegisterCustomPath("StopSpam", "StopSpam Logs", + PROFILE_PATH "\\" CURRENT_PROFILE "\\StopSpamLog"); + } return 0; } -- cgit v1.2.3