Changeset b5fe39b
- Timestamp:
- 2012-02-10T23:49:28Z (13 years ago)
- Branches:
- master
- Children:
- 00d6760
- Parents:
- fc0640e
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
rfc0640e rb5fe39b 1455 1455 </bitlbee-setting> 1456 1456 1457 <bitlbee-setting name="show_old_mentions" type="integer" scope="account"> 1458 <default>20</default> 1459 1460 <description> 1461 <para> 1462 This setting specifies the number of old mentions to fetch on connection. Must be less or equal to 200. Setting it to 0 disables this feature. 1463 </para> 1464 </description> 1465 </bitlbee-setting> 1466 1457 1467 <bitlbee-setting name="switchboard_keepalives" type="boolean" scope="account"> 1458 1468 <default>false</default> -
protocols/twitter/twitter.c
rfc0640e rb5fe39b 279 279 s->flags |= ACC_SET_OFFLINE_ONLY; 280 280 281 s = set_add(&acc->set, "show_old_mentions", " true", set_eval_bool, acc);281 s = set_add(&acc->set, "show_old_mentions", "20", set_eval_int, acc); 282 282 283 283 s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc); -
protocols/twitter/twitter_lib.c
rfc0640e rb5fe39b 752 752 struct twitter_data *td = ic->proto_data; 753 753 gboolean include_mentions = set_getbool(&ic->acc->set, "fetch_mentions"); 754 gboolean show_old_mentions = set_getbool(&ic->acc->set, "show_old_mentions");754 int show_old_mentions = set_getint(&ic->acc->set, "show_old_mentions"); 755 755 struct twitter_xml_list *home_timeline = td->home_timeline_obj; 756 756 struct twitter_xml_list *mentions = td->mentions_obj; … … 774 774 if (include_mentions && mentions && mentions->list) { 775 775 for (l = mentions->list; l; l = g_slist_next(l)) { 776 if ( !show_old_mentions&& output && twitter_compare_elements(l->data, output->data) < 0) {776 if (show_old_mentions < 1 && output && twitter_compare_elements(l->data, output->data) < 0) { 777 777 continue; 778 778 } … … 852 852 args[4] = "since_id"; 853 853 args[5] = g_strdup_printf("%llu", (long long unsigned int) td->timeline_id); 854 } 855 856 if (twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, ic, 0, args, 857 td->timeline_id ? 6 : 4) == NULL) { 854 } else { 855 args[4] = "count"; 856 args[5] = g_strdup_printf("%d", set_getint(&ic->acc->set, "show_old_mentions")); 857 } 858 859 if (twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, 860 ic, 0, args, 6) == NULL) { 858 861 if (++td->http_fails >= 5) 859 862 imcb_error(ic, "Could not retrieve %s: %s",
Note: See TracChangeset
for help on using the changeset viewer.