From 242041da34896f223decc51c35e4fd2c79f66625 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Sat, 29 Mar 2025 21:47:26 -0400 Subject: [PATCH] show inventory and poll totals --- src/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command.c b/src/command.c index 0a0a97c..9e0f929 100644 --- a/src/command.c +++ b/src/command.c @@ -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; }