#include "res.h"
#include "s_bsd.h"
#include "s_conf.h"
+#include "s_user.h"
#include "s_stats.h"
#include "send.h"
#include "struct.h"
cn = 0, /* connections */
ch = 0, /* channels */
lcc = 0, /* local client conf links */
- us = 0, /* user structs */
chi = 0, /* channel invites */
chb = 0, /* channel bans */
wwu = 0, /* whowas users */
chbm = 0, /* memory used by channel bans */
cm = 0, /* memory used by clients */
cnm = 0, /* memory used by connections */
+ us = 0, /* user structs */
+ usm = 0, /* memory used by user structs */
awm = 0, /* memory used by aways */
wwam = 0, /* whowas away memory used */
wwm = 0, /* whowas array memory used */
}
if (cli_user(acptr))
{
- us++;
for (link = cli_user(acptr)->invited; link; link = link->next)
usi++;
for (member = cli_user(acptr)->channel; member; member = member->next_channel)
}
cm = c * sizeof(struct Client);
cnm = cn * sizeof(struct Connection);
+ user_count_memory(&us, &usm);
for (chptr = GlobalChannelList; chptr; chptr = chptr->next)
{
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":Clients %d(%zu) Connections %d(%zu)", c, cm, cn, cnm);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
- ":Users %d(%zu) Accounts %d(%zu) Invites %d(%zu)",
- us, us * sizeof(struct User), acc, acc * (ACCOUNTLEN + 1),
+ ":Users %zu(%zu) Accounts %d(%zu) Invites %d(%zu)",
+ us, usm, acc, acc * (ACCOUNTLEN + 1),
usi, usi * sizeof(struct SLink));
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":User channels %d(%zu) Aways %d(%zu)", memberships,