Adium

Changeset 22968

Show
Ignore:
Timestamp:
03/22/2008 11:24:07 AM (8 months ago)
Author:
evands
Message:

Resuppress the 'Could not add buddy 1 for an unknown reason' message and handle it in all languages. Fixes #8762

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/Purple Service/SLPurpleCocoaAdapter.m

    r22851 r22968  
    658658        //Suppress notification warnings we have no interest in seeing 
    659659        if (secondaryString) { 
    660                 /* 
    661                  We previously suppressed: 
    662                         if (([secondaryString rangeOfString:@"Could not add the buddy 1 for an unknown reason"].location != NSNotFound) || 
    663                  is it still needed? 
    664                  */ 
    665660                if ((strcmp(secondary, _("Not supported by host")) == 0) || /* OSCAR */ 
    666661                        (strcmp(secondary, _("Not logged in")) == 0) || /* OSCAR */ 
     
    670665                } 
    671666                 
     667                if ([secondaryString isEqualToString: 
     668                         [NSString stringWithFormat:[NSString stringWithUTF8String:_("Could not add the buddy %s for an unknown reason.")], "1"]]) { 
     669                        /* Rather random error displayed by OSCAR (since forever, as of libpurple 2.4.0) for some clients while connecting */ 
     670                        return NULL; 
     671                } 
     672                 
    672673                if ([secondaryString rangeOfString:@"Your contact is using Windows Live"].location != NSNotFound) { 
    673674                         /* Yahoo without MSN support - English string from the server */ 
     
    677678        } else if ([primaryString rangeOfString: @"did not get sent"].location != NSNotFound) { 
    678679                //Oscar send error 
     680                //This may not ever occur as of libpurple 2.4.0; I can't find the phrase 'did not get sent' in any of the code. -evands 
    679681                NSString *targetUserName = [[[[primaryString componentsSeparatedByString:@" message to "] objectAtIndex:1] componentsSeparatedByString:@" did not get "] objectAtIndex:0]; 
    680682