Changes in protocols/jabber/jabber.c [3a620ff:399d65a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r3a620ff r399d65a 82 82 s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK; 83 83 84 set_add(&acc->set, "oauth", "false", set_eval_oauth, acc); 85 84 86 if (strcmp(acc->prpl->name, "hipchat") == 0) { 85 87 set_setstr(&acc->set, "server", "chat.hipchat.com"); 86 88 } else { 87 set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);88 89 89 /* this reuses set_eval_oauth, which clears the password */ 90 90 set_add(&acc->set, "anonymous", "false", set_eval_oauth, acc); … … 321 321 struct jabber_data *jd = ic->proto_data; 322 322 323 imcb_chat_list_free(ic); 324 323 325 while (jd->filetransfers) { 324 326 imcb_file_canceled(ic, (( struct jabber_transfer *) jd->filetransfers->data)->ft, "Logging out"); … … 397 399 if (g_strcasecmp(who, JABBER_OAUTH_HANDLE) == 0 && 398 400 !(jd->flags & OPT_LOGGED_IN) && jd->fd == -1) { 399 if (sasl_oauth2_get_refresh_token(ic, message)) { 401 402 if (jd->flags & JFLAG_HIPCHAT) { 403 sasl_oauth2_got_token(ic, message, NULL, NULL); 404 return 1; 405 } else if (sasl_oauth2_get_refresh_token(ic, message)) { 400 406 return 1; 401 407 } else { … … 577 583 } else { 578 584 /* jabber_chat_join without the underscore is the conference.c one */ 579 return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password")); 585 return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password"), 586 set_getbool(sets, "always_use_nicks")); 580 587 } 581 588 … … 586 593 { 587 594 return jabber_chat_with(ic, who); 595 } 596 597 static void jabber_chat_list_(struct im_connection *ic, const char *server) 598 { 599 struct jabber_data *jd = ic->proto_data; 600 601 if (server && *server) { 602 jabber_iq_disco_muc(ic, server); 603 } else if (jd->muc_host && *jd->muc_host) { 604 jabber_iq_disco_muc(ic, jd->muc_host); 605 } else { 606 /* throw an error here, don't query conference.[server] directly. 607 * for things like jabber.org it gets you 18000 results of garbage */ 608 imcb_error(ic, "Please specify a server name such as `conference.%s'", jd->server); 609 } 588 610 } 589 611 … … 686 708 void jabber_chat_add_settings(account_t *acc, set_t **head) 687 709 { 710 set_add(head, "always_use_nicks", "false", set_eval_bool, NULL); 711 688 712 /* Meh. Stupid room passwords. Not trying to obfuscate/hide 689 713 them from the user for now. */ … … 693 717 void jabber_chat_free_settings(account_t *acc, set_t **head) 694 718 { 719 set_del(head, "always_use_nicks"); 720 695 721 set_del(head, "password"); 696 722 } … … 759 785 ret->chat_join = jabber_chat_join_; 760 786 ret->chat_with = jabber_chat_with_; 787 ret->chat_list = jabber_chat_list_; 761 788 ret->chat_add_settings = jabber_chat_add_settings; 762 789 ret->chat_free_settings = jabber_chat_free_settings;
Note: See TracChangeset
for help on using the changeset viewer.