- for (i = 0; i < Context->msgcount; i++)
- if (!Context->hdrs[i]->read && !Context->hdrs[i]->deleted)
- unread++;
- if (!unread)
- continue;
+ for (; list; list = list->next) {
+ NNTP_DATA *data = (NNTP_DATA *) list->data;
+
+ if (data && data->subscribed && data->unread) {
+ if (Context && Context->magic == M_NNTP &&
+ !m_strcmp(data->group, ((NNTP_DATA *) Context->data)->group)) {
+ unsigned int i, unread = 0;
+
+ for (i = 0; i < Context->msgcount; i++)
+ if (!Context->hdrs[i]->read && !Context->hdrs[i]->deleted)
+ unread++;
+ if (!unread)
+ continue;
+ }
+ m_strcpy(dst, dstlen, data->group);
+ break;