Changeset 03f3828
- Timestamp:
- 2010-07-24T14:06:22Z (14 years ago)
- Branches:
- master
- Children:
- 7989d40d
- Parents:
- c8791f2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
rc8791f2 r03f3828 693 693 694 694 ic->flags |= IRC_CHANNEL_CHAT_PICKME; 695 acc->prpl->chat_join( acc->ic, room, nick, NULL );695 acc->prpl->chat_join( acc->ic, room, nick, NULL, &ic->set ); 696 696 ic->flags &= ~IRC_CHANNEL_CHAT_PICKME; 697 697 … … 788 788 { 789 789 struct irc_channel *ic = set->data; 790 account_t *acc ;790 account_t *acc, *oa; 791 791 792 792 if( !( acc = account_get( ic->irc->b, value ) ) ) … … 797 797 return SET_INVALID; 798 798 } 799 800 if( set->value && ( oa = account_get( ic->irc->b, set->value ) ) && 801 oa->prpl->chat_free_settings ) 802 oa->prpl->chat_free_settings( oa, &ic->set ); 803 804 if( acc->prpl->chat_add_settings ) 805 acc->prpl->chat_add_settings( acc, &ic->set ); 799 806 800 807 return g_strdup_printf( "%s(%s)", acc->prpl->name, acc->user ); -
protocols/jabber/jabber.c
rc8791f2 r03f3828 441 441 } 442 442 443 static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password )443 static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password, set_t **sets ) 444 444 { 445 445 if( strchr( room, '@' ) == NULL ) -
protocols/nogaim.h
rc8791f2 r03f3828 212 212 * not implement this. */ 213 213 struct groupchat * 214 (* chat_join) (struct im_connection *, const char *room, const char *nick, const char *password); 214 (* chat_join) (struct im_connection *, const char *room, 215 const char *nick, const char *password, set_t **sets); 215 216 /* Change the topic, if supported. Note that BitlBee expects the IM 216 217 server to confirm the topic change with a regular topic change … … 219 220 void (* chat_topic) (struct groupchat *, char *topic); 220 221 222 /* If your protocol module needs any special info for joining chatrooms 223 other than a roomname + nickname, add them here. */ 224 void (* chat_add_settings) (account_t *acc, set_t **head); 225 void (* chat_free_settings) (account_t *acc, set_t **head); 226 221 227 /* You can tell what away states your protocol supports, so that 222 228 * BitlBee will try to map the IRC away reasons to them. If your … … 234 240 /* Incoming transfer request */ 235 241 void (* transfer_request) (struct im_connection *, file_transfer_t *ft, char *handle ); 242 243 /* Some placeholders so eventually older plugins may cooperate with newer BitlBees. */ 244 void *resv1; 245 void *resv2; 246 void *resv3; 247 void *resv4; 248 void *resv5; 236 249 }; 237 250 -
protocols/oscar/oscar.c
rc8791f2 r03f3828 2506 2506 } 2507 2507 2508 struct groupchat *oscar_chat_join(struct im_connection * ic, const char * room, const char * nick, const char * password ) 2508 struct groupchat *oscar_chat_join_internal(struct im_connection *ic, const char *room, 2509 const char *nick, const char *password, int exchange_number) 2509 2510 { 2510 2511 struct oscar_data * od = (struct oscar_data *)ic->proto_data; … … 2514 2515 int st; 2515 2516 2516 st = aim_chatnav_createroom(od->sess, cur, room, 4);2517 st = aim_chatnav_createroom(od->sess, cur, room, exchange_number); 2517 2518 2518 2519 return NULL; … … 2520 2521 struct create_room * cr = g_new0(struct create_room, 1); 2521 2522 2522 cr->exchange = 4;2523 cr->exchange = exchange_number; 2523 2524 cr->name = g_strdup(room); 2524 2525 od->create_rooms = g_slist_append(od->create_rooms, cr); … … 2529 2530 } 2530 2531 2532 struct groupchat *oscar_chat_join(struct im_connection *ic, const char *room, 2533 const char *nick, const char *password, set_t **sets) 2534 { 2535 return oscar_chat_join_internal(ic, room, nick, password, set_getint(sets, "exchange_number")); 2536 } 2537 2531 2538 struct groupchat *oscar_chat_with(struct im_connection * ic, char *who) 2532 2539 { … … 2545 2552 2546 2553 c = imcb_chat_new(ic, chatname); 2547 ret = oscar_chat_join (ic, chatname, NULL, NULL);2554 ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4); 2548 2555 aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0); 2549 2556 … … 2557 2564 struct aim_chat_invitation * inv = data; 2558 2565 2559 oscar_chat_join (inv->ic, inv->name, NULL, NULL);2566 oscar_chat_join_internal(inv->ic, inv->name, NULL, NULL, 4); 2560 2567 g_free(inv->name); 2561 2568 g_free(inv); … … 2568 2575 g_free(inv->name); 2569 2576 g_free(inv); 2577 } 2578 2579 void oscar_chat_add_settings(account_t *acc, set_t **head) 2580 { 2581 set_add(head, "exchange_number", "4", set_eval_int, NULL); 2582 } 2583 2584 void oscar_chat_free_settings(account_t *acc, set_t **head) 2585 { 2586 set_del(head, "exchange_number"); 2570 2587 } 2571 2588 … … 2590 2607 ret->chat_with = oscar_chat_with; 2591 2608 ret->chat_join = oscar_chat_join; 2609 ret->chat_add_settings = oscar_chat_add_settings; 2610 ret->chat_free_settings = oscar_chat_free_settings; 2592 2611 ret->add_permit = oscar_add_permit; 2593 2612 ret->add_deny = oscar_add_deny;
Note: See TracChangeset
for help on using the changeset viewer.