Changeset 61ae52c
- Timestamp:
- 2007-04-20T05:19:06Z (17 years ago)
- Branches:
- master
- Children:
- b0eaa5b
- Parents:
- d323394c
- Location:
- protocols
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/sb.c
rd323394c r61ae52c 184 184 /* Create the groupchat structure. */ 185 185 g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session ); 186 sb->chat = serv_got_joined_chat( ic, buf );186 sb->chat = imcb_chat_new( ic, buf ); 187 187 188 188 /* Populate the channel. */ 189 if( sb->who ) add_chat_buddy( sb->chat, sb->who );190 add_chat_buddy( sb->chat, ic->acc->user );189 if( sb->who ) imcb_chat_add_buddy( sb->chat, sb->who ); 190 imcb_chat_add_buddy( sb->chat, ic->acc->user ); 191 191 192 192 /* And make sure the switchboard doesn't look like a regular chat anymore. */ … … 232 232 if( sb->chat ) 233 233 { 234 serv_got_chat_left( sb->chat );234 imcb_chat_removed( sb->chat ); 235 235 } 236 236 … … 374 374 { 375 375 g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session ); 376 sb->chat = serv_got_joined_chat( ic, buf );376 sb->chat = imcb_chat_new( ic, buf ); 377 377 378 378 g_free( sb->who ); … … 380 380 } 381 381 382 add_chat_buddy( sb->chat, cmd[4] );382 imcb_chat_add_buddy( sb->chat, cmd[4] ); 383 383 384 384 if( num == tot ) 385 385 { 386 add_chat_buddy( sb->chat, ic->acc->user );386 imcb_chat_add_buddy( sb->chat, ic->acc->user ); 387 387 } 388 388 } … … 462 462 msn_sb_to_chat( sb ); 463 463 464 add_chat_buddy( sb->chat, cmd[1] );464 imcb_chat_add_buddy( sb->chat, cmd[1] ); 465 465 } 466 466 else if( sb->chat ) 467 467 { 468 add_chat_buddy( sb->chat, cmd[1] );468 imcb_chat_add_buddy( sb->chat, cmd[1] ); 469 469 sb->ready = 1; 470 470 } … … 516 516 else if( sb->chat ) 517 517 { 518 remove_chat_buddy( sb->chat, cmd[1], "" );518 imcb_chat_remove_buddy( sb->chat, cmd[1], "" ); 519 519 } 520 520 else … … 611 611 else if( sb->chat ) 612 612 { 613 serv_got_chat_in( sb->chat, cmd[1], 0, body, 0 );613 imcb_chat_msg( sb->chat, cmd[1], body, 0, 0 ); 614 614 } 615 615 else … … 670 670 else if( sb->chat ) 671 671 { 672 serv_got_chat_in( sb->chat, cmd[1], 0, buf, 0 );672 imcb_chat_msg( sb->chat, cmd[1], buf, 0, 0 ); 673 673 } 674 674 else -
protocols/nogaim.c
rd323394c r61ae52c 686 686 } 687 687 688 void serv_got_chat_left( struct groupchat *c )688 void imcb_chat_removed( struct groupchat *c ) 689 689 { 690 690 struct im_connection *ic = c->ic; … … 723 723 } 724 724 725 void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime)725 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at ) 726 726 { 727 727 struct im_connection *ic = c->ic; … … 744 744 } 745 745 746 struct groupchat * serv_got_joined_chat( struct im_connection *ic, char *handle )746 struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle ) 747 747 { 748 748 struct groupchat *c; … … 771 771 /* buddy_chat.c */ 772 772 773 void add_chat_buddy( struct groupchat *b, char *handle )773 void imcb_chat_add_buddy( struct groupchat *b, char *handle ) 774 774 { 775 775 user_t *u = user_findhandle( b->ic, handle ); … … 805 805 } 806 806 807 void remove_chat_buddy( struct groupchat *b, char *handle, char *reason )807 void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason ) 808 808 { 809 809 user_t *u; -
protocols/nogaim.h
rd323394c r61ae52c 94 94 }; 95 95 96 /* struct buddy_chat went away and got merged with this. */97 96 struct groupchat { 98 97 struct im_connection *ic; … … 191 190 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); 192 191 193 /* Groupchats */194 G_MODULE_EXPORT void add_chat_buddy( struct groupchat *b, char *handle );195 G_MODULE_EXPORT void remove_chat_buddy( struct groupchat *b, char *handle, char *reason );196 G_MODULE_EXPORT void serv_got_chat_invite( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );197 G_MODULE_EXPORT struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle );198 G_MODULE_EXPORT void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime );199 G_MODULE_EXPORT void serv_got_chat_left( struct groupchat *c );200 struct groupchat *chat_by_channel( char *channel );201 202 192 /* Buddy management */ 203 193 G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, char *handle, char *group ); … … 212 202 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags ); 213 203 204 /* Groupchats */ 205 G_MODULE_EXPORT void imcb_chat_invited( struct im_connection *ic, char *handle, char *who, char *msg, GList *data ); 206 G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle ); 207 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, char *handle ); 208 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason ); 209 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at ); 210 G_MODULE_EXPORT void imcb_chat_removed( struct groupchat *c ); 211 struct groupchat *chat_by_channel( char *channel ); 212 214 213 /* Actions, or whatever. */ 215 214 int imc_set_away( struct im_connection *ic, char *away ); -
protocols/oscar/oscar.c
rd323394c r61ae52c 750 750 chatcon = find_oscar_chat_by_conn(ic, fr->conn); 751 751 chatcon->id = id; 752 chatcon->cnv = serv_got_joined_chat(ic, chatcon->show);752 chatcon->cnv = imcb_chat_new(ic, chatcon->show); 753 753 chatcon->cnv->data = chatcon; 754 754 … … 1461 1461 1462 1462 for (i = 0; i < count; i++) 1463 add_chat_buddy(c->cnv, info[i].sn);1463 imcb_chat_add_buddy(c->cnv, info[i].sn); 1464 1464 1465 1465 return 1; … … 1484 1484 1485 1485 for (i = 0; i < count; i++) 1486 remove_chat_buddy(c->cnv, info[i].sn, NULL);1486 imcb_chat_remove_buddy(c->cnv, info[i].sn, NULL); 1487 1487 1488 1488 return 1; … … 1535 1535 tmp = g_malloc(BUF_LONG); 1536 1536 g_snprintf(tmp, BUF_LONG, "%s", msg); 1537 serv_got_chat_in(ccon->cnv, info->sn, 0, tmp, time((time_t)NULL));1537 imcb_chat_msg(ccon->cnv, info->sn, tmp, 0, 0); 1538 1538 g_free(tmp); 1539 1539 … … 2513 2513 2514 2514 /* Notify the conversation window that we've left the chat */ 2515 serv_got_chat_left(cc->cnv);2515 imcb_chat_removed(cc->cnv); 2516 2516 2517 2517 /* Destroy the chat_connection */ -
protocols/yahoo/yahoo.c
rd323394c r61ae52c 146 146 147 147 while( ic->conversations ) 148 serv_got_chat_left( ic->conversations );148 imcb_chat_removed( ic->conversations ); 149 149 150 150 for( l = yd->buddygroups; l; l = l->next ) … … 318 318 319 319 yahoo_conference_logoff( yd->y2_id, NULL, c->data, c->title ); 320 serv_got_chat_left( c );320 imcb_chat_removed( c ); 321 321 } 322 322 … … 330 330 roomname = g_strdup_printf( "%s-Bee-%d", ic->acc->user, byahoo_chat_id ); 331 331 332 c = serv_got_joined_chat( ic, roomname );333 add_chat_buddy( c, ic->acc->user );332 c = imcb_chat_new( ic, roomname ); 333 imcb_chat_add_buddy( c, ic->acc->user ); 334 334 335 335 /* FIXME: Free this thing when the chat's destroyed. We can't *always* … … 790 790 { 791 791 yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); 792 add_chat_buddy( inv->c, inv->ic->acc->user );792 imcb_chat_add_buddy( inv->c, inv->ic->acc->user ); 793 793 g_free( inv->name ); 794 794 g_free( inv ); … … 798 798 { 799 799 yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" ); 800 serv_got_chat_left( inv->c );800 imcb_chat_removed( inv->c ); 801 801 g_free( inv->name ); 802 802 g_free( inv ); … … 814 814 memset( inv, 0, sizeof( struct byahoo_conf_invitation ) ); 815 815 inv->name = g_strdup( room ); 816 inv->c = serv_got_joined_chat( ic, (char*) room );816 inv->c = imcb_chat_new( ic, (char*) room ); 817 817 inv->c->data = members; 818 818 inv->yid = id; … … 822 822 for( m = members; m; m = m->next ) 823 823 if( g_strcasecmp( m->data, ic->acc->user ) != 0 ) 824 add_chat_buddy( inv->c, m->data );824 imcb_chat_add_buddy( inv->c, m->data ); 825 825 826 826 g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", room, who, msg ); … … 844 844 845 845 if( c ) 846 add_chat_buddy( c, (char*) who );846 imcb_chat_add_buddy( c, (char*) who ); 847 847 } 848 848 … … 856 856 857 857 if( c ) 858 remove_chat_buddy( c, (char*) who, "" );858 imcb_chat_remove_buddy( c, (char*) who, "" ); 859 859 } 860 860 … … 868 868 869 869 if( c ) 870 serv_got_chat_in( c, (char*) who, 0, (char*) m, 0 );870 imcb_chat_msg( c, (char*) who, (char*) m, 0, 0 ); 871 871 g_free( m ); 872 872 }
Note: See TracChangeset
for help on using the changeset viewer.