#include "ircd.h"
#include "jupe.h"
#include "list.h"
+#include "listener.h"
#include "motd.h"
#include "msgq.h"
#include "numeric.h"
wwu = 0, /* whowas users */
cl = 0, /* classes */
co = 0, /* conf lines */
+ listeners = 0, /* listeners */
memberships = 0; /* channel memberships */
int usi = 0, /* users invited */
dbufs_used = 0, /* memory used by dbufs */
msg_allocated = 0, /* memory used by struct Msg */
msgbuf_allocated = 0, /* memory used by struct MsgBuf */
+ listenersm = 0, /* memory used by listetners */
rm = 0, /* res memory used */
totcl = 0, totch = 0, totww = 0, tot = 0;
chm += (strlen(chptr->chname) + sizeof(struct Channel));
for (link = chptr->invites; link; link = link->next)
chi++;
- for (ban = chptr->banlist; link; ban = ban->next)
+ for (ban = chptr->banlist; ban; ban = ban->next)
{
chb++;
chbm += strlen(ban->who) + strlen(ban->banstr) + 2 + sizeof(*ban);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":User channels %d(%zu) Aways %d(%zu)", memberships,
memberships * sizeof(struct Membership), aw, awm);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Attached confs %d(%zu)",
- lcc, lcc * sizeof(struct SLink));
totcl = cm + cnm + us * sizeof(struct User) + memberships * sizeof(struct Membership) + awm;
totcl += lcc * sizeof(struct SLink) + usi * sizeof(struct SLink);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Conflines %d(%zu)", co,
- com);
-
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Classes %d(%zu)", cl,
- cl * sizeof(struct ConnectionClass));
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Conflines %d(%zu) Attached %d(%zu) Classes %d(%zu)",
+ co, com, lcc, lcc * sizeof(struct SLink),
+ cl, cl * sizeof(struct ConnectionClass));
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":Channels %d(%zu) Bans %d(%zu)", ch, chm, chb, chbm);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
- ":Channel membrs %d(%zu) invite %d(%zu)", memberships,
+ ":Channel Members %d(%zu) Invites %d(%zu)", memberships,
memberships * sizeof(struct Membership), chi,
chi * sizeof(struct SLink));
totch = chm + chbm + chi * sizeof(struct SLink);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
- ":Whowas users %d(%zu) away %d(%zu)", wwu,
- wwu * sizeof(struct User), wwa, wwam);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Whowas array %d(%zu)",
- feature_int(FEAT_NICKNAMEHISTORYLENGTH), wwm);
+ ":Whowas Users %d(%zu) Away %d(%zu) Array %d(%zu)",
+ wwu, wwu * sizeof(struct User), wwa, wwam,
+ feature_int(FEAT_NICKNAMEHISTORYLENGTH), wwm);
totww = wwu * sizeof(struct User) + wwam + wwm;
":Hash: client %d(%zu), chan is the same", HASHSIZE,
sizeof(void *) * HASHSIZE);
+ count_listener_memory(&listeners, &listenersm);
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
+ ":Listeners allocated %d(%zu)", listeners, listenersm);
/*
* NOTE: this count will be accurate only for the exact instant that this
* message is being sent, so the count is affected by the dbufs that
totww, totch, totcl, com, dbufs_allocated, msg_allocated,
msgbuf_allocated);
}
-