show inventory and poll totals
This commit is contained in:
parent
9dc0c0684e
commit
242041da34
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue