Changes in protocols/twitter/twitter.c [9f03c47:bbff22d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
r9f03c47 rbbff22d 345 345 imcb_log(ic, "Getting contact list"); 346 346 twitter_get_friends_ids(ic, -1); 347 twitter_get_mutes_ids(ic, -1);348 twitter_get_noretweets_ids(ic, -1);349 347 } else { 350 348 twitter_main_loop_start(ic); … … 471 469 g_regex_match(regex, msg, 0, &match_info); 472 470 while (g_match_info_matches(match_info)) { 473 gchar * url;471 gchar *s, *url; 474 472 475 473 url = g_match_info_fetch(match_info, 2); 476 474 url_len_diff += target_len - g_utf8_strlen(url, -1); 477 475 476 /* Add another character for https://t.co/... URLs */ 477 if ((s = g_match_info_fetch(match_info, 3))) { 478 url_len_diff += 1; 479 g_free(s); 480 } 478 481 g_free(url); 479 482 g_match_info_next(match_info, NULL); … … 538 541 if (strcmp(acc->prpl->name, "twitter") == 0) { 539 542 def_url = TWITTER_API_URL; 540 def_tul = "2 3";543 def_tul = "22"; 541 544 def_mentions = "true"; 542 545 } else { /* if( strcmp( acc->prpl->name, "identica" ) == 0 ) */ … … 687 690 } 688 691 689 g_slist_foreach(td->mutes_ids, (GFunc) g_free, NULL);690 g_slist_free(td->mutes_ids);691 692 g_slist_foreach(td->noretweets_ids, (GFunc) g_free, NULL);693 g_slist_free(td->noretweets_ids);694 695 692 http_close(td->stream); 696 693 twitter_filter_remove_all(ic); … … 951 948 } else if ((g_strcasecmp(cmd[0], "favourite") == 0 || 952 949 g_strcasecmp(cmd[0], "favorite") == 0 || 953 g_strcasecmp(cmd[0], "fav") == 0 || 954 g_strcasecmp(cmd[0], "like") == 0) && cmd[1]) { 950 g_strcasecmp(cmd[0], "fav") == 0) && cmd[1]) { 955 951 if ((id = twitter_message_id_from_command_arg(ic, cmd[1], NULL))) { 956 952 twitter_favourite_tweet(ic, id); … … 964 960 } else if (g_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) { 965 961 twitter_remove_buddy(ic, cmd[1], NULL); 966 goto eof;967 } else if (g_strcasecmp(cmd[0], "mute") == 0 && cmd[1]) {968 twitter_mute_create_destroy(ic, cmd[1], 1);969 goto eof;970 } else if (g_strcasecmp(cmd[0], "unmute") == 0 && cmd[1]) {971 twitter_mute_create_destroy(ic, cmd[1], 0);972 962 goto eof; 973 963 } else if ((g_strcasecmp(cmd[0], "report") == 0 || … … 1092 1082 struct prpl *ret = g_new0(struct prpl, 1); 1093 1083 1094 ret->options = PRPL_OPT_NOOTR | PRPL_OPT_NO_PASSWORD;1084 ret->options = OPT_NOOTR; 1095 1085 ret->name = "twitter"; 1096 1086 ret->login = twitter_login; … … 1119 1109 ret = g_memdup(ret, sizeof(struct prpl)); 1120 1110 ret->name = "identica"; 1121 ret->options = PRPL_OPT_NOOTR;1122 1111 register_protocol(ret); 1123 1112 }
Note: See TracChangeset
for help on using the changeset viewer.