Add '6' to server options when compiled with IPv6 support (and related
[ircu2.10.12-pk.git] / ircd / s_debug.c
index 1232d2dea3efc4b051b2db65ac424623ae5428ec..4a202bfef1b0dc0de4cf2b97bfa38bc6e61881f7 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- *
+ */
+/** @file
+ * @brief Debug support for the ircd.
+ * @version $Id$
  */
 #include "config.h"
 
@@ -49,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>
@@ -108,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';
 
@@ -202,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;
@@ -282,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);
     }
   }