show inventory and poll totals

This commit is contained in:
biglyderv 2025-03-29 21:47:26 -04:00
parent 9dc0c0684e
commit 242041da34
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5

View file

@ -232,6 +232,7 @@ int polls_command(char *command, hashmap *polls, hashmap *cmd) {
printf("Current polls (page %i):\n", page);
struct pager i = {.page = page - 1, .i = -1, .is_poll = 1, .cmd = cmd};
hashmap_iterate(polls, inv_handler, &i);
printf("Total: %i\n", i.i + 1);
return 1;
}
@ -252,6 +253,7 @@ int slash_command(char *command, hashmap *inv) {
printf("Your inventory (page %i):\n", page);
struct pager i = {.page = page - 1, .i = -1, .is_poll = 0};
hashmap_iterate(inv, inv_handler, &i);
printf("Total: %i\n", i.i + 1);
return 1;
}