Exemple #1
0
/* 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]);
}
Exemple #2
0
/* 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]);
  }
}
Exemple #3
0
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]);
}
Exemple #4
0
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]);
  }
}