/* report_messages() * * inputs - pointer to client to report to * output - NONE * side effects - client is shown list of commands */ void report_messages(struct Client *source_p) { const struct MessageTree *const mtree = &msg_tree; for (unsigned int i = 0; i < MAXPTRLEN; ++i) if (mtree->pointers[i]) recurse_report_messages(source_p, mtree->pointers[i]); }
/* report_messages() * * inputs - pointer to client to report to * output - NONE * side effects - client is shown list of commands */ void report_messages(struct Client *source_p) { struct MessageTree *mtree = &msg_tree; int i; for (i = 0; i < MAXPTRLEN; i++) { if (mtree->pointers[i] != NULL) recurse_report_messages(source_p, mtree->pointers[i]); } }
static void recurse_report_messages(struct Client *source_p, const struct MessageTree *mtree) { if (mtree->msg) sendto_one_numeric(source_p, &me, RPL_STATSCOMMANDS, mtree->msg->cmd, mtree->msg->count, mtree->msg->bytes, mtree->msg->rcount); for (unsigned int i = 0; i < MAXPTRLEN; ++i) if (mtree->pointers[i]) recurse_report_messages(source_p, mtree->pointers[i]); }
static void recurse_report_messages(struct Client *source_p, struct MessageTree *mtree) { int i; if (mtree->msg != NULL) { sendto_one(source_p, form_str(RPL_STATSCOMMANDS), me.name, source_p->name, mtree->msg->cmd, mtree->msg->count, mtree->msg->bytes, mtree->msg->rcount); } for (i = 0; i < MAXPTRLEN; i++) { if (mtree->pointers[i] != NULL) recurse_report_messages(source_p, mtree->pointers[i]); } }