Convert the ban parts of struct SLink into struct Ban.
[ircu2.10.12-pk.git] / ircd / s_debug.c
index adab64f0f13ca584fca1317ca0852f45ad64380c..6f1266cc952cfdbd557408e5d55a0c1d2cb9fb0e 100644 (file)
@@ -203,6 +203,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 +284,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);
     }
   }