static unsigned int _checked = 0;
-static void update_sidebar (NNTP_DATA* data) {
+void nntp_sync_sidebar (NNTP_DATA* data) {
int i = 0;
BUFFY* tmp = NULL;
char buf[STRING];
* mailboxes command ;-((( FIXME
*/
buf[0] = '\0';
- snprintf (buf, sizeof (buf), "nntp%s://%s%s/%s",
+ snprintf (buf, sizeof (buf), "nntp%s://%s%s%s%s/%s",
(data->nserv->conn->account.flags & M_ACCT_SSL) ? "s" : "",
NONULL (data->nserv->conn->account.user),
+ *data->nserv->conn->account.pass ? ":" : "",
+ *data->nserv->conn->account.pass ? data->nserv->conn->account.pass : "",
data->nserv->conn->account.host,
data->group);
debug_print (4, ("group == '%s'\n", buf));
if (colon) {
*colon = '\0';
colon++;
- nntp_get_status (ctx, h, p, atoi (colon));
+ nntp_get_status (ctx, h, b, atoi (colon));
if (h && h->article_num == 0 && str_cmp (group, b) == 0)
h->article_num = atoi (colon);
}
unsigned int first;
ACCOUNT acct;
+ memset (&acct, 0, sizeof (ACCOUNT));
+
if (nntp_parse_url (ctx->path, &acct, buf, sizeof (buf)) < 0 || !*buf) {
mutt_error (_("%s is an invalid newsgroup specification!"), ctx->path);
mutt_sleep (2);
|| tmp != data)
nntp_delete_data (data);
else
- update_sidebar (data);
+ nntp_sync_sidebar (data);
}
/* commit changes and terminate connection */
nntp_data->entries[0].first = 1;
nntp_data->entries[0].last = 0;
}
- update_sidebar (nntp_data);
+ nntp_sync_sidebar (nntp_data);
}
time (&nntp_data->nserv->check_time);
if (l->data && ((NNTP_DATA *) l->data)->subscribed)
_nntp_check_mailbox (NULL, (NNTP_DATA *) l->data);
}
+ sidebar_draw (CurrentMenu);
}
else if (!force)
return 0;