Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r777461b r0e788f5  
    158158{
    159159        struct twitter_data *td = ic->proto_data;
    160         const char *url = set_getstr(&ic->acc->set, "base_url");
    161160
    162161        imcb_log(ic, "Requesting OAuth request token");
    163        
    164         if (!strstr(url, "twitter.com") && !strstr(url, "identi.ca"))
    165                 imcb_log(ic, "Warning: OAuth only works with identi.ca and "
    166                              "Twitter.");
    167162
    168163        td->oauth_info = oauth_request_token(get_oauth_service(ic), twitter_oauth_callback, ic);
     
    183178        td = ic->proto_data;
    184179        if (info->stage == OAUTH_REQUEST_TOKEN) {
    185                 char *name, *msg;
     180                char name[strlen(ic->acc->user) + 9], *msg;
    186181
    187182                if (info->request_token == NULL) {
     
    191186                }
    192187
    193                 name = g_strdup_printf("%s_%s", td->prefix, ic->acc->user);
     188                sprintf(name, "%s_%s", td->prefix, ic->acc->user);
    194189                msg = g_strdup_printf("To finish OAuth authentication, please visit "
    195190                                      "%s and respond with the resulting PIN code.",
    196191                                      info->auth_url);
    197192                imcb_buddy_msg(ic, name, msg, 0, 0);
    198                 g_free(name);
    199193                g_free(msg);
    200194        } else if (info->stage == OAUTH_ACCESS_TOKEN) {
     
    289283        char *def_url;
    290284        char *def_tul;
    291         char *def_mentions;
    292285
    293286        if (strcmp(acc->prpl->name, "twitter") == 0) {
    294287                def_url = TWITTER_API_URL;
    295288                def_tul = "20";
    296                 def_mentions = "true";
    297289        } else {                /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */
    298290                def_url = IDENTICA_API_URL;
    299291                def_tul = "0";
    300                 def_mentions = "false";
    301292        }
    302293
     
    311302        s->flags |= ACC_SET_OFFLINE_ONLY;
    312303
    313         s = set_add(&acc->set, "fetch_mentions", def_mentions, set_eval_bool, acc);
     304        s = set_add(&acc->set, "fetch_mentions", "true", set_eval_bool, acc);
    314305
    315306        s = set_add(&acc->set, "message_length", "140", set_eval_int, acc);
Note: See TracChangeset for help on using the changeset viewer.