Changeset c3caa46
- Timestamp:
- 2010-05-22T13:46:25Z (15 years ago)
- Branches:
- master
- Children:
- f85e9d6
- Parents:
- 05a8932
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r05a8932 rc3caa46 496 496 } 497 497 498 struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password ) 499 { 500 PurpleAccount *pa = ic->proto_data; 501 PurplePlugin *prpl = purple_plugins_find_with_id( pa->protocol_id ); 502 PurplePluginProtocolInfo *pi = prpl->info->extra_info; 503 GHashTable *chat_hash; 504 PurpleConversation *conv; 505 GList *info, *l; 506 507 if( !pi->chat_info || !pi->chat_info_defaults || 508 !( info = pi->chat_info( purple_account_get_connection( pa ) ) ) ) 509 { 510 imcb_error( ic, "Joining chatrooms not supported by this protocol" ); 511 return NULL; 512 } 513 514 if( ( conv = purple_find_conversation_with_account( PURPLE_CONV_TYPE_CHAT, room, pa ) ) ) 515 purple_conversation_destroy( conv ); 516 517 chat_hash = pi->chat_info_defaults( purple_account_get_connection( pa ), room ); 518 519 for( l = info; l; l = l->next ) 520 { 521 struct proto_chat_entry *pce = l->data; 522 523 if( strcmp( pce->identifier, "handle" ) == 0 ) 524 g_hash_table_replace( chat_hash, "handle", g_strdup( nick ) ); 525 else if( strcmp( pce->identifier, "password" ) == 0 ) 526 g_hash_table_replace( chat_hash, "password", g_strdup( password ) ); 527 else if( strcmp( pce->identifier, "passwd" ) == 0 ) 528 g_hash_table_replace( chat_hash, "passwd", g_strdup( password ) ); 529 } 530 531 serv_join_chat( purple_account_get_connection( pa ), chat_hash ); 532 533 return NULL; 534 } 535 498 536 void purple_transfer_request( struct im_connection *ic, file_transfer_t *ft, char *handle ); 499 537 … … 662 700 conv->ui_data = gc; 663 701 gc->data = conv; 702 703 /* libpurple brokenness: Whatever. Show that we join right away, 704 there's no clear "This is you!" signaling in _add_users so 705 don't even try. */ 706 imcb_chat_add_buddy( gc, gc->ic->acc->user ); 664 707 } 665 708 } … … 676 719 struct groupchat *gc = conv->ui_data; 677 720 GList *b; 678 679 if( !gc->joined && strcmp( conv->account->protocol_id, "prpl-msn" ) == 0 )680 {681 /* Work around the broken MSN module which fucks up the user's682 handle completely when informing him/her that he just683 successfully joined the room s/he just created (v2.6.6). */684 imcb_chat_add_buddy( gc, gc->ic->acc->user );685 }686 721 687 722 for( b = cbuddies; b; b = b->next ) … … 1046 1081 funcs.chat_invite = purple_chat_invite; 1047 1082 funcs.chat_leave = purple_chat_leave; 1083 funcs.chat_join = purple_chat_join; 1048 1084 funcs.transfer_request = purple_transfer_request; 1049 1085
Note: See TracChangeset
for help on using the changeset viewer.