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