Changes in protocols/jabber/jabber.c [399d65a:3a620ff]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r399d65a r3a620ff 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 86 84 if (strcmp(acc->prpl->name, "hipchat") == 0) { 87 85 set_setstr(&acc->set, "server", "chat.hipchat.com"); 88 86 } 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 325 323 while (jd->filetransfers) { 326 324 imcb_file_canceled(ic, (( struct jabber_transfer *) jd->filetransfers->data)->ft, "Logging out"); … … 399 397 if (g_strcasecmp(who, JABBER_OAUTH_HANDLE) == 0 && 400 398 !(jd->flags & OPT_LOGGED_IN) && jd->fd == -1) { 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)) { 399 if (sasl_oauth2_get_refresh_token(ic, message)) { 406 400 return 1; 407 401 } else { … … 583 577 } else { 584 578 /* jabber_chat_join without the underscore is the conference.c one */ 585 return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password"), 586 set_getbool(sets, "always_use_nicks")); 579 return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password")); 587 580 } 588 581 … … 593 586 { 594 587 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 }610 588 } 611 589 … … 708 686 void jabber_chat_add_settings(account_t *acc, set_t **head) 709 687 { 710 set_add(head, "always_use_nicks", "false", set_eval_bool, NULL);711 712 688 /* Meh. Stupid room passwords. Not trying to obfuscate/hide 713 689 them from the user for now. */ … … 717 693 void jabber_chat_free_settings(account_t *acc, set_t **head) 718 694 { 719 set_del(head, "always_use_nicks");720 721 695 set_del(head, "password"); 722 696 } … … 785 759 ret->chat_join = jabber_chat_join_; 786 760 ret->chat_with = jabber_chat_with_; 787 ret->chat_list = jabber_chat_list_;788 761 ret->chat_add_settings = jabber_chat_add_settings; 789 762 ret->chat_free_settings = jabber_chat_free_settings;
Note: See TracChangeset
for help on using the changeset viewer.