Ver Fonte

* Fix wrong count when using filtered cmd_groups

Bryan Drewery há 14 anos atrás
pai
commit
c01338e5e4
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      src/cmds.c

+ 2 - 1
src/cmds.c

@@ -937,6 +937,7 @@ static void cmd_groups(int idx, char *par)
 
   if (botnick.length()) {
     dprintf(idx, "%s is in groups: %s\n", botnick.c_str(), static_cast<bd::String>(botGroups[botnick].join(" ")).c_str());
+    dprintf(idx, "Total groups: %zu\n", botGroups[botnick].length());
   } else {
     // Display all groups and which bots are in them
     for (size_t i = 0; i < allgroups.length(); ++i) {
@@ -944,9 +945,9 @@ static void cmd_groups(int idx, char *par)
       const bd::Array<bd::String> bots(groupBots[group]);
       dumplots(idx, bd::String::printf("%-*s: ", int(maxGroupLen), group.c_str()).c_str(), static_cast<bd::String>(bots.join(" ")).c_str());
     }
+    dprintf(idx, "Total groups: %zu\n", allgroups.length());
   }
 
-  dprintf(idx, "Total groups: %zu\n", allgroups.length());
   return;
 }