diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-04-30 17:48:23 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-04-30 17:48:23 +0000 |
commit | 82204e942c1f8977ce2f1f5ef4e0fb1eeac5995e (patch) | |
tree | f7896fd40fb01d79bdff30989ef8b1dc63df7c29 | |
parent | a8e6b23ebb3557e8505aecf2b4c0241e8ee40bf6 (diff) |
- Move report_resv() to m_stats.c
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@1928 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | include/resv.h | 3 | ||||
-rw-r--r-- | modules/m_stats.c | 31 | ||||
-rw-r--r-- | src/resv.c | 31 |
3 files changed, 31 insertions, 34 deletions
diff --git a/include/resv.h b/include/resv.h index 02dbee7..4705b52 100644 --- a/include/resv.h +++ b/include/resv.h @@ -29,9 +29,6 @@ extern dlink_list nresv_items; extern dlink_list resv_channel_list; extern struct MaskItem *create_resv(const char *, const char *, const dlink_list *); - -extern void report_resv(struct Client *); - extern int valid_wild_card_simple(const char *); extern int resv_find_exempt(const struct Client *, const struct MaskItem *); extern struct MaskItem *match_find_resv(const char *); diff --git a/modules/m_stats.c b/modules/m_stats.c index 8f9288c..5a3aa4c 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -245,6 +245,37 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type) } } +/* report_resv() + * + * inputs - pointer to client pointer to report to. + * output - NONE + * side effects - report all resvs to client. + */ +static void +report_resv(struct Client *source_p) +{ + dlink_node *ptr = NULL; + struct MaskItem *conf = NULL; + + DLINK_FOREACH(ptr, resv_channel_list.head) + { + conf = ptr->data; + sendto_one(source_p, form_str(RPL_STATSQLINE), + me.name, source_p->name, + conf->until ? 'q' : 'Q', conf->count, + conf->name, conf->reason); + } + + DLINK_FOREACH(ptr, nresv_items.head) + { + conf = ptr->data; + sendto_one(source_p, form_str(RPL_STATSQLINE), + me.name, source_p->name, + conf->until ? 'q' : 'Q', conf->count, + conf->name, conf->reason); + } +} + /* * This is part of the STATS replies. There is no offical numeric for this * since this isnt an official command, in much the same way as HASH isnt. @@ -187,37 +187,6 @@ match_find_resv(const char *name) return NULL; } -/* report_resv() - * - * inputs - pointer to client pointer to report to. - * output - NONE - * side effects - report all resvs to client. - */ -void -report_resv(struct Client *source_p) -{ - dlink_node *ptr = NULL; - struct MaskItem *conf = NULL; - - DLINK_FOREACH(ptr, resv_channel_list.head) - { - conf = ptr->data; - sendto_one(source_p, form_str(RPL_STATSQLINE), - me.name, source_p->name, - conf->until ? 'q' : 'Q', conf->count, - conf->name, conf->reason); - } - - DLINK_FOREACH(ptr, nresv_items.head) - { - conf = ptr->data; - sendto_one(source_p, form_str(RPL_STATSQLINE), - me.name, source_p->name, - conf->until ? 'q' : 'Q', conf->count, - conf->name, conf->reason); - } -} - /* valid_wild_card_simple() * * inputs - data to check for sufficient non-wildcard characters |