- Timestamp:
- 2009-10-11T21:08:26Z (15 years ago)
- Branches:
- master
- Children:
- ec5e57d
- Parents:
- 0f7ee7e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r0f7ee7e5 rb74b287 93 93 } 94 94 95 static void purple_sync_settings( account_t *acc, PurpleAccount *pa ) 96 { 97 PurplePlugin *prpl = purple_plugins_find_with_id( pa->protocol_id ); 98 PurplePluginProtocolInfo *pi = prpl->info->extra_info; 99 GList *i; 100 101 for( i = pi->protocol_options; i; i = i->next ) 102 { 103 PurpleAccountOption *o = i->data; 104 const char *name; 105 set_t *s; 106 107 name = purple_account_option_get_setting( o ); 108 s = set_find( &acc->set, name ); 109 if( s->value == NULL ) 110 continue; 111 112 switch( purple_account_option_get_type( o ) ) 113 { 114 case PURPLE_PREF_STRING: 115 purple_account_set_string( pa, name, set_getstr( &acc->set, name ) ); 116 break; 117 118 case PURPLE_PREF_INT: 119 purple_account_set_int( pa, name, set_getint( &acc->set, name ) ); 120 break; 121 122 case PURPLE_PREF_BOOLEAN: 123 purple_account_set_bool( pa, name, set_getbool( &acc->set, name ) ); 124 break; 125 126 default: 127 break; 128 } 129 } 130 } 131 95 132 static void purple_login( account_t *acc ) 96 133 { … … 103 140 purple_connections = g_slist_prepend( purple_connections, ic ); 104 141 105 pa = purple_account_new( acc->user, acc->prpl->name );142 ic->proto_data = pa = purple_account_new( acc->user, acc->prpl->name ); 106 143 purple_account_set_password( pa, acc->pass ); 107 108 ic->proto_data = pa; 144 purple_sync_settings( acc, pa ); 109 145 110 146 purple_account_set_enabled( pa, "BitlBee", TRUE ); … … 117 153 purple_account_set_enabled( pa, "BitlBee", FALSE ); 118 154 purple_connections = g_slist_remove( purple_connections, ic ); 119 purple_account _destroy( pa );155 purple_accounts_remove( pa ); 120 156 } 121 157 … … 194 230 195 231 if( ic != NULL ) 232 { 196 233 imc_logout( ic, TRUE ); 234 } 197 235 } 198 236
Note: See TracChangeset
for help on using the changeset viewer.