summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/daemon/angelbeats/abc.c4
-rw-r--r--pttbbs/daemon/angelbeats/angelbeats.c11
-rw-r--r--pttbbs/include/daemons.h2
-rw-r--r--pttbbs/mbbsd/angel.c2
4 files changed, 9 insertions, 10 deletions
diff --git a/pttbbs/daemon/angelbeats/abc.c b/pttbbs/daemon/angelbeats/abc.c
index f3fc2636..8420318e 100644
--- a/pttbbs/daemon/angelbeats/abc.c
+++ b/pttbbs/daemon/angelbeats/abc.c
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
return -1;
}
} else if (strcmp(argv[1], "list") == 0) {
- req.operation = ANGELBEATS_REQ_GET_UID_LIST;
+ req.operation = ANGELBEATS_REQ_GET_ONLINE_LIST;
}
else
return 0;
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
rpt.my_index,
rpt.my_active_index,
rpt.my_active_masters);
- } else if (req.operation == ANGELBEATS_REQ_GET_UID_LIST) {
+ } else if (req.operation == ANGELBEATS_REQ_GET_ONLINE_LIST) {
int i;
if (toread(fd, &list, sizeof(list)) != sizeof(list)) {
perror("toread");
diff --git a/pttbbs/daemon/angelbeats/angelbeats.c b/pttbbs/daemon/angelbeats/angelbeats.c
index 512064c3..bbb91cc8 100644
--- a/pttbbs/daemon/angelbeats/angelbeats.c
+++ b/pttbbs/daemon/angelbeats/angelbeats.c
@@ -371,7 +371,7 @@ create_angel_report(int myuid, angel_beats_report *prpt) {
}
int
-fill_angel_uid_list(angel_beats_uid_list *list) {
+fill_online_angel_list(angel_beats_uid_list *list) {
static size_t i = 0;
size_t iter = 0;
int is_pause, logins;
@@ -384,8 +384,7 @@ fill_angel_uid_list(angel_beats_uid_list *list) {
i %= g_angel_list_size;
kanade = g_angel_list + i;
get_angel_state(kanade, &is_pause, &logins);
- // TODO Let client handle case of "pause".
- if (!logins || is_pause)
+ if (!logins)
continue;
list->uids[list->angels++] = kanade->uid;
}
@@ -481,13 +480,13 @@ client_cb(int fd, short event, void *arg) {
goto end;
}
break;
- case ANGELBEATS_REQ_GET_UID_LIST:
- fprintf(stderr, "%s get_uid_list\n", Cdatelite(&clk));
+ case ANGELBEATS_REQ_GET_ONLINE_LIST:
+ fprintf(stderr, "%s get_online_uid_list\n", Cdatelite(&clk));
{
angel_beats_uid_list list = {0};
list.cb = sizeof(list);
list.angels = 0;
- fill_angel_uid_list(&list);
+ fill_online_angel_list(&list);
// write different kind of data!
write(fd, &list, sizeof(list));
goto end;
diff --git a/pttbbs/include/daemons.h b/pttbbs/include/daemons.h
index 83f0d95e..f670644b 100644
--- a/pttbbs/include/daemons.h
+++ b/pttbbs/include/daemons.h
@@ -67,7 +67,7 @@ enum ANGELBEATS_OPERATIONS {
ANGELBEATS_REQ_SUGGEST_AND_LINK,
ANGELBEATS_REQ_REMOVE_LINK,
ANGELBEATS_REQ_HEARTBEAT,
- ANGELBEATS_REQ_GET_UID_LIST,
+ ANGELBEATS_REQ_GET_ONLINE_LIST,
};
typedef struct {
diff --git a/pttbbs/mbbsd/angel.c b/pttbbs/mbbsd/angel.c
index 85ec0314..79700da7 100644
--- a/pttbbs/mbbsd/angel.c
+++ b/pttbbs/mbbsd/angel.c
@@ -207,7 +207,7 @@ select_angel() {
}
req.cb = sizeof(req);
- req.operation = ANGELBEATS_REQ_GET_UID_LIST;
+ req.operation = ANGELBEATS_REQ_GET_ONLINE_LIST;
req.master_uid = usernum;
if (towrite(fd, &req, sizeof(req)) < 0 ||