Add '6' to server options when compiled with IPv6 support (and related
[ircu2.10.12-pk.git] / ircd / s_debug.c
index adab64f0f13ca584fca1317ca0852f45ad64380c..4a202bfef1b0dc0de4cf2b97bfa38bc6e61881f7 100644 (file)
@@ -50,7 +50,7 @@
 #include "sys.h"
 #include "whowas.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -109,6 +109,9 @@ const char* debug_serveropts(void)
 #if defined(USE_POLL) && defined(HAVE_POLL_H)
   AddC('U');
 #endif
+#ifdef  IPV6
+  AddC('6');
+#endif
 
   serveropts[i] = '\0';
 
@@ -203,6 +206,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
 {
   struct Client *acptr;
   struct SLink *link;
+  struct Ban *ban;
   struct Channel *chptr;
   struct ConfItem *aconf;
   const struct ConnectionClass* cltmp;
@@ -283,10 +287,10 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
     chm += (strlen(chptr->chname) + sizeof(struct Channel));
     for (link = chptr->invites; link; link = link->next)
       chi++;
-    for (link = chptr->banlist; link; link = link->next)
+    for (ban = chptr->banlist; link; ban = ban->next)
     {
       chb++;
-      chbm += (strlen(link->value.cp) + 1 + sizeof(struct SLink));
+      chbm += strlen(ban->who) + strlen(ban->banstr) + 2 + sizeof(*ban);
     }
   }