summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-04-30 17:48:23 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-04-30 17:48:23 +0000
commit82204e942c1f8977ce2f1f5ef4e0fb1eeac5995e (patch)
treef7896fd40fb01d79bdff30989ef8b1dc63df7c29 /modules
parenta8e6b23ebb3557e8505aecf2b4c0241e8ee40bf6 (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
Diffstat (limited to 'modules')
-rw-r--r--modules/m_stats.c31
1 files changed, 31 insertions, 0 deletions
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.