Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r399d65a r3a620ff  
    8282        s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
    8383
    84         set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);
    85 
    8684        if (strcmp(acc->prpl->name, "hipchat") == 0) {
    8785                set_setstr(&acc->set, "server", "chat.hipchat.com");
    8886        } else {
     87                set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);
     88
    8989                /* this reuses set_eval_oauth, which clears the password */
    9090                set_add(&acc->set, "anonymous", "false", set_eval_oauth, acc);
     
    321321        struct jabber_data *jd = ic->proto_data;
    322322
    323         imcb_chat_list_free(ic);
    324 
    325323        while (jd->filetransfers) {
    326324                imcb_file_canceled(ic, (( struct jabber_transfer *) jd->filetransfers->data)->ft, "Logging out");
     
    399397        if (g_strcasecmp(who, JABBER_OAUTH_HANDLE) == 0 &&
    400398            !(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)) {
    406400                        return 1;
    407401                } else {
     
    583577        } else {
    584578                /* 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"));
    587580        }
    588581
     
    593586{
    594587        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         }
    610588}
    611589
     
    708686void jabber_chat_add_settings(account_t *acc, set_t **head)
    709687{
    710         set_add(head, "always_use_nicks", "false", set_eval_bool, NULL);
    711 
    712688        /* Meh. Stupid room passwords. Not trying to obfuscate/hide
    713689           them from the user for now. */
     
    717693void jabber_chat_free_settings(account_t *acc, set_t **head)
    718694{
    719         set_del(head, "always_use_nicks");
    720 
    721695        set_del(head, "password");
    722696}
     
    785759        ret->chat_join = jabber_chat_join_;
    786760        ret->chat_with = jabber_chat_with_;
    787         ret->chat_list = jabber_chat_list_;
    788761        ret->chat_add_settings = jabber_chat_add_settings;
    789762        ret->chat_free_settings = jabber_chat_free_settings;
Note: See TracChangeset for help on using the changeset viewer.