From f4ce855b39be6651819afb94fa239d2e24409c0a Mon Sep 17 00:00:00 2001 From: sss Date: Sat, 21 Mar 2009 18:11:43 +0000 Subject: removed useless option changed plugin info git-svn-id: http://172.18.13.13/svn/mim_plugs@15 63852ff1-2cfd-40b9-8011-e561a9d89b1c --- stopspam_mod/trunk/init.cpp | 61 +++++++++++++++++++++++++++++++++++++++-- stopspam_mod/trunk/options.cpp | 6 ++-- stopspam_mod/trunk/stopspam.cpp | 6 ++-- stopspam_mod/trunk/stopspam.rc | 2 -- 4 files changed, 64 insertions(+), 11 deletions(-) diff --git a/stopspam_mod/trunk/init.cpp b/stopspam_mod/trunk/init.cpp index 95a7632..fc32742 100644 --- a/stopspam_mod/trunk/init.cpp +++ b/stopspam_mod/trunk/init.cpp @@ -14,7 +14,7 @@ BOOL gbIgnoreContacts = 0; BOOL gbExclude = 1; BOOL gbDelExcluded = 0; BOOL gbDosServiceIntegration = 0; -BOOL gbDelNotInList = 0; +//BOOL gbDelNotInList = 0; tstring gbSpammersGroup = _T("Spammers"); tstring gbQuestion; tstring gbAnswer; @@ -37,7 +37,7 @@ UTF8_INTERFACE utfi; PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), - pluginName" mod", + 0, PLUGIN_MAKE_VERSION(0, 0, 1, 6), pluginDescription, "Roman Miklashevsky", @@ -49,10 +49,65 @@ PLUGININFOEX pluginInfoEx = { MIID_STOPSPAM }; + +char *date() +{ + static char d[11]; + char *tmp = __DATE__, m[4], mn[3] = "01"; + m[0]=tmp[0]; + m[1]=tmp[1]; + m[2]=tmp[2]; + if(strstr(m,"Jan")) + strcpy(mn,"01"); + else if(strstr(m,"Feb")) + strcpy(mn,"02"); + else if(strstr(m,"Mar")) + strcpy(mn,"03"); + else if(strstr(m,"Apr")) + strcpy(mn,"04"); + else if(strstr(m,"May")) + strcpy(mn,"05"); + else if(strstr(m,"Jun")) + strcpy(mn,"06"); + else if(strstr(m,"Jul")) + strcpy(mn,"07"); + else if(strstr(m,"Aug")) + strcpy(mn,"08"); + else if(strstr(m,"Sep")) + strcpy(mn,"09"); + else if(strstr(m,"Oct")) + strcpy(mn,"10"); + else if(strstr(m,"Nov")) + strcpy(mn,"11"); + else if(strstr(m,"Dec")) + strcpy(mn,"12"); + d[0]=tmp[7]; + d[1]=tmp[8]; + d[2]=tmp[9]; + d[3]=tmp[10]; + d[4]='.'; + d[5]=mn[0]; + d[6]=mn[1]; + d[7]='.'; + d[8]=tmp[4]; + d[9]=tmp[5]; + return d; +} + + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0, 7, 0, 0 )) return NULL; + { + static char plugname[52]; + strcpy(plugname, pluginName" mod ["); + strcat(plugname, date()); + strcat(plugname, " "); + strcat(plugname, __TIME__); + strcat(plugname, "]"); + pluginInfoEx.shortName = plugname; + } return &pluginInfoEx; } @@ -77,7 +132,7 @@ void InitVars() gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0); gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1); gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0); - gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0); +// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0); } static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam) diff --git a/stopspam_mod/trunk/options.cpp b/stopspam_mod/trunk/options.cpp index 8e78301..9983444 100644 --- a/stopspam_mod/trunk/options.cpp +++ b/stopspam_mod/trunk/options.cpp @@ -34,7 +34,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_SETCHECK, gbIgnoreContacts ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_SETCHECK, gbExclude ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_SETCHECK, gbDelExcluded ? BST_CHECKED : BST_UNCHECKED, 0); - SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_SETCHECK, gbDelNotInList ? BST_CHECKED : BST_UNCHECKED, 0); +// SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_SETCHECK, gbDelNotInList ? BST_CHECKED : BST_UNCHECKED, 0); } return TRUE; case WM_COMMAND:{ @@ -67,8 +67,8 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0)); DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration = BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0)); - DBWriteContactSettingByte(NULL, pluginName, "DelNotInList", gbDelNotInList = - BST_CHECKED == SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_GETCHECK, 0, 0)); +/* DBWriteContactSettingByte(NULL, pluginName, "DelNotInList", gbDelNotInList = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_GETCHECK, 0, 0)); */ { static tstring NewGroupName, CurrentGroupName; NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME); diff --git a/stopspam_mod/trunk/stopspam.cpp b/stopspam_mod/trunk/stopspam.cpp index bfee2f5..b3fc3d8 100644 --- a/stopspam_mod/trunk/stopspam.cpp +++ b/stopspam_mod/trunk/stopspam.cpp @@ -93,13 +93,13 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) return 0; }*/ - if(gbDelNotInList) +/* if(gbDelNotInList) if(DBGetContactSettingStringPAN_A((HANDLE)w, "CList", "Group", "") == "Not In List") { CallService(MS_DB_CONTACT_DELETE, (WPARAM)w, 0); return 1; } - +*/ if(DBGetContactSettingByte(hContact, pluginName, "Answered", 0)) return 0; if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0)) @@ -241,7 +241,7 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l) DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l; // if CList/NotOnList is being deleted then remove answeredSetting - if(strcmp(cws->szModule, pluginName)) + if(strcmp(cws->szModule, "CList")) return 0; if(strcmp(cws->szSetting, "NotOnList")) return 0; diff --git a/stopspam_mod/trunk/stopspam.rc b/stopspam_mod/trunk/stopspam.rc index 726349f..b38c2d4 100644 --- a/stopspam_mod/trunk/stopspam.rc +++ b/stopspam_mod/trunk/stopspam.rc @@ -80,8 +80,6 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,188,270,8 CONTROL "Exclude contacts which we sending something from spam check",ID_EXCLUDE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,178,270,8 - CONTROL "Automatically delete contacts from ""Not In List"" group",ID_DEL_NO_IN_LIST, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,101,270,8 END -- cgit v1.2.3