Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv15623/include

Modified Files:
        Address.h MFilter.h MInterface.mid 
Log Message:
added more anti-spam filter tests


Index: Address.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Address.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -u -2 -r1.8 -r1.9
--- Address.h   26 Apr 2002 13:15:05 -0000      1.8
+++ Address.h   18 Jun 2002 14:48:12 -0000      1.9
@@ -149,7 +149,10 @@
 END_DECLARE_AUTOPTR();
 
-/// declarae global comparison operator for addresses
+/// declare global comparison operator for addresses
 extern bool operator==(const AddressList_obj& addrList1,
                        const AddressList_obj& addrList2);
+
+/// check whether the given string contains at least one of our own addresses
+extern bool ContainsOwnAddress(const String& str, Profile *profile);
 
 #endif // _ADDRESS_H_

Index: MFilter.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MFilter.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -2 -r1.11 -r1.12
--- MFilter.h   12 Nov 2001 17:15:39 -0000      1.11
+++ MFilter.h   18 Jun 2002 14:48:12 -0000      1.12
@@ -23,4 +23,5 @@
    dialog-constructed filter rule. */
 //@{
+
 /** Enum holding the different possible matching filter actions.
     Do not change the order of these without changing MFilter.cpp
@@ -29,19 +30,21 @@
 enum MFDialogTest
 {
-   ORC_T_Always = 0,
-   ORC_T_Match,
-   ORC_T_Contains,
-   ORC_T_MatchC,
-   ORC_T_ContainsC,
-   ORC_T_MatchRegExC,
-   ORC_T_LargerThan,
-   ORC_T_SmallerThan,
-   ORC_T_OlderThan,
-   ORC_T_NewerThan,
-   ORC_T_IsSpam,
-   ORC_T_Python,
-   ORC_T_MatchRegEx,
-   ORC_T_ScoreAbove,
-   ORC_T_ScoreBelow,
+   ORC_T_Always = 0,       // test is always true
+   ORC_T_Match,            // argument matches the target (case insensitive)
+   ORC_T_Contains,         // target contains the argument (case insensitive)
+   ORC_T_MatchC,           // as Match but case sensitive
+   ORC_T_ContainsC,        // as Contains but case sensitive
+   ORC_T_MatchRegExC,      // as RegEx but case sensitive
+   ORC_T_LargerThan,       // size of the message is larger than argument
+   ORC_T_SmallerThan,      //                        smaller
+   ORC_T_OlderThan,        // date of the message is older than argument
+   ORC_T_NewerThan,        //                        newer
+   ORC_T_IsSpam,           // doesn't pass RBL test [BROKEN]
+   ORC_T_Python,           // return value of Python script
+   ORC_T_MatchRegEx,       // target matches RE in argument
+   ORC_T_ScoreAbove,       // score of the message is greater than argument
+   ORC_T_ScoreBelow,       //                         less
+   ORC_T_IsToMe,           // the message is addresses to one of my addresses
+   ORC_T_8BitSubject,      // the message has too many 8 bit chars in subject
    ORC_T_Illegal,// illegal must not occur
    ORC_T_Max = ORC_T_Illegal
@@ -86,4 +89,11 @@
    ORC_L_Max
 };
+
+/// return true if this filter test requires an argument
+extern bool FilterTestNeedsArgument(int test);
+
+/// return true if this filter test requires the target to operate on
+extern bool FilterTestNeedsTarget(int test);
+
 //@}
 

Index: MInterface.mid
===================================================================
RCS file: /cvsroot/mahogany/M/include/MInterface.mid,v
retrieving revision 1.31
retrieving revision 1.32
diff -b -u -2 -r1.31 -r1.32
--- MInterface.mid      11 Mar 2002 19:40:46 -0000      1.31
+++ MInterface.mid      18 Jun 2002 14:48:12 -0000      1.32
@@ -16,4 +16,5 @@
 INCLUDE(`"Message.h"')
 INCLUDE(`"SendMessage.h"')
+INCLUDE(`"Address.h"')
 INCLUDE(`"wx/persctrl.h"')
 
@@ -154,4 +155,11 @@
 FUNCTION(strutil_freeRegEx, void, (
 ARG(strutil_RegEx *, re)), `::strutil_freeRegEx(re);')
+
+FUNCTION(contains_own_address, bool, (
+      ARG(const String &, str),
+      ARG(Profile *, profile)
+   ),
+   `return ::ContainsOwnAddress(str, profile);'
+)
 
 FUNCTION(RemoveModule, void, (ARG(MModuleCommon *, module)),


----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                      >>>     http://thinkgeek.com/sf    <<<

_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to