Plugins/Purple Service/CBPurpleOscarAccount.m
branchadium-1.5.10.3
changeset 5976 a752b22eb698
parent 5750 dad5f3048dc3
equal deleted inserted replaced
5975:af3dbe7e7d32 5976:a752b22eb698
    95 																			  group:GROUP_ACCOUNT_STATUS] boolValue]);
    95 																			  group:GROUP_ACCOUNT_STATUS] boolValue]);
    96 	
    96 	
    97 	purple_account_set_bool(account, "allow_multiple_logins", [[self preferenceForKey:PREFERENCE_ALLOW_MULTIPLE_LOGINS
    97 	purple_account_set_bool(account, "allow_multiple_logins", [[self preferenceForKey:PREFERENCE_ALLOW_MULTIPLE_LOGINS
    98 																				group:GROUP_ACCOUNT_STATUS] boolValue]);
    98 																				group:GROUP_ACCOUNT_STATUS] boolValue]);
    99 	
    99 	
   100 	//Always yes, so SSL on ICQ works again. Note that we'll disable it if we're using a proxy server.
   100 	purple_account_set_string(account, "login_type", "client_login");
   101 	purple_account_set_bool(account, "use_clientlogin", TRUE);
       
   102 	
   101 	
   103 	if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_OPPORTUNISTIC]) {
   102 	if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_OPPORTUNISTIC]) {
   104 		purple_account_set_string(account, "encryption", "opportunistic_encryption");
   103 		purple_account_set_string(account, "encryption", "opportunistic_encryption");
   105 	} else if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_REQUIRED]) {
   104 	} else if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_REQUIRED]) {
   106 		purple_account_set_string(account, "encryption", "require_encryption");
   105 		purple_account_set_string(account, "encryption", "require_encryption");
   107 	} else {
   106 	} else {
   108 		purple_account_set_string(account, "encryption", "no_encryption");
   107 		purple_account_set_string(account, "encryption", "no_encryption");
   109 	}
   108 	}
   110 }
       
   111 
       
   112 - (void)continueConnectWithConfiguredProxy
       
   113 {
       
   114 	PurpleProxyInfo *proxy_info = purple_account_get_proxy_info(account);
       
   115  
       
   116     if ((purple_proxy_info_get_type(proxy_info) != PURPLE_PROXY_NONE) && 
       
   117         purple_proxy_info_get_host(proxy_info) && strlen(purple_proxy_info_get_host(proxy_info))) {
       
   118         /* Proxy servers and client login don't currently get along.  This should be fixed in libpurple, but until then,
       
   119          * just don't use it, unless the hidden preference is set.
       
   120          */
       
   121 		purple_account_set_bool(account, "use_clientlogin", [[NSUserDefaults standardUserDefaults] boolForKey:@"AIUseClientLoginWithProxies"]);
       
   122     }
       
   123         
       
   124     [super continueConnectWithConfiguredProxy];
       
   125 }
   109 }
   126     
   110     
   127 - (void)migrateSSL
   111 - (void)migrateSSL
   128 {
   112 {
   129 	// ICQ and AIM should override this
   113 	// ICQ and AIM should override this