Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25873/src/mail

Modified Files:
        Address.cpp 
Log Message:
extended ContainsOwnAddresses() to return the matching own address and also to only 
consider mailing list addresses optionally, not always

Index: Address.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/Address.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -u -2 -r1.16 -r1.17
--- Address.cpp 20 Oct 2003 16:18:26 -0000      1.16
+++ Address.cpp 6 Jul 2004 12:24:40 -0000       1.17
@@ -269,5 +269,9 @@
 // ----------------------------------------------------------------------------
 
-bool ContainsOwnAddress(const String& str, Profile *profile)
+bool
+ContainsOwnAddress(const String& str,
+                   Profile *profile,
+                   OwnAddressKind kind,
+                   String *own)
 {
    // get the list of our own addresses
@@ -281,10 +285,13 @@
    wxArrayString addresses = strutil_restore_array(returnAddrs);
 
-   // and also add the mailing list addresses because we consider them to be
-   // "own" as well -- after all we're probably subscribed to them
+   if ( kind == OwnAddress_To )
+   {
+      // if we're interested in "own receipient" addresses, add the mailing
+      // list addresses because we normally do get mail from them
    wxArrayString addressesML = strutil_restore_array(
                                  READ_CONFIG(profile, MP_LIST_ADDRESSES)
                                );
    WX_APPEND_ARRAY(addresses, addressesML);
+   }
 
    const size_t count = addresses.GetCount();
@@ -321,4 +328,7 @@
                   addr->GetDomain().Matches(domain) )
          {
+            if ( own )
+               *own = addresses[n];
+
             return true;
          }



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to