Changeset cd741d8 for protocols/purple
- Timestamp:
- 2009-11-23T23:23:37Z (15 years ago)
- Branches:
- master
- Children:
- 45a19e5
- Parents:
- 4e04194
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r4e04194 rcd741d8 149 149 purple_connections = g_slist_prepend( purple_connections, ic ); 150 150 151 ic->proto_data = pa = purple_account_new( acc->user, acc->prpl->name);151 ic->proto_data = pa = purple_account_new( acc->user, (char*) acc->prpl->data ); 152 152 purple_account_set_password( pa, acc->pass ); 153 153 purple_sync_settings( acc, pa ); … … 451 451 void purple_initmodule() 452 452 { 453 struct prpl funcs; 453 454 GList *prots; 454 455 … … 478 479 purple_prefs_load(); 479 480 481 memset( &funcs, 0, sizeof( funcs ) ); 482 funcs.login = purple_login; 483 funcs.init = purple_init; 484 funcs.logout = purple_logout; 485 funcs.buddy_msg = purple_buddy_msg; 486 funcs.away_states = purple_away_states; 487 funcs.set_away = purple_set_away; 488 funcs.add_buddy = purple_add_buddy; 489 funcs.remove_buddy = purple_remove_buddy; 490 funcs.keepalive = purple_keepalive; 491 funcs.send_typing = purple_send_typing; 492 funcs.handle_cmp = g_strcasecmp; 493 480 494 for( prots = purple_plugins_get_protocols(); prots; prots = prots->next ) 481 495 { 482 struct prpl *ret = g_new0( struct prpl, 1 );483 496 PurplePlugin *prot = prots->data; 484 485 ret->name = prot->info->id; 486 ret->login = purple_login; 487 ret->init = purple_init; 488 ret->logout = purple_logout; 489 ret->buddy_msg = purple_buddy_msg; 490 ret->away_states = purple_away_states; 491 ret->set_away = purple_set_away; 492 ret->add_buddy = purple_add_buddy; 493 ret->remove_buddy = purple_remove_buddy; 494 ret->keepalive = purple_keepalive; 495 ret->send_typing = purple_send_typing; 496 ret->handle_cmp = g_strcasecmp; 497 497 struct prpl *ret; 498 499 ret = g_memdup( &funcs, sizeof( funcs ) ); 500 ret->name = ret->data = prot->info->id; 501 if( strncmp( ret->name, "prpl-", 5 ) == 0 ) 502 ret->name += 5; 498 503 register_protocol( ret ); 499 } 500 } 504 505 if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 ) 506 { 507 ret = g_memdup( &funcs, sizeof( funcs ) ); 508 ret->name = "oscar"; 509 ret->data = prot->info->id; 510 register_protocol( ret ); 511 } 512 } 513 }
Note: See TracChangeset
for help on using the changeset viewer.