Author: Bleep <helveytw@home.com>
[ircu2.10.12-pk.git] / ircd / s_stats.c
index a26c0b2e2c6d8ce6cb31dc6a1c49ec1e170f1988..87591d9e1e4af738b3058c1a47d80343b91a7aee 100644 (file)
@@ -85,8 +85,6 @@ const char *statsinfo[] = {
 static unsigned int report_array[17][3] = {
   {CONF_SERVER, RPL_STATSCLINE, 'C'},
   {CONF_CLIENT, RPL_STATSILINE, 'I'},
-  {CONF_KILL, RPL_STATSKLINE, 'K'},
-  {CONF_IPKILL, RPL_STATSKLINE, 'k'},
   {CONF_LEAF, RPL_STATSLLINE, 'L'},
   {CONF_OPERATOR, RPL_STATSOLINE, 'O'},
   {CONF_HUB, RPL_STATSHLINE, 'H'},
@@ -123,9 +121,7 @@ void report_configured_links(struct Client *sptr, int mask)
        * displayed on STATS reply.    -Vesa
        */
       /* Special-case 'k' or 'K' lines as appropriate... -Kev */
-      if ((tmp->status & CONF_KLINE))
-       send_reply(sptr, p[1], c, host, pass, name, port, get_conf_class(tmp));
-      else if ((tmp->status & CONF_UWORLD))
+      if ((tmp->status & CONF_UWORLD))
        send_reply(sptr, p[1], c, host, pass, name, port, get_conf_class(tmp));
       else if ((tmp->status & (CONF_SERVER | CONF_HUB)))
        send_reply(sptr, p[1], c, "*", name, port, get_conf_class(tmp));
@@ -158,6 +154,18 @@ void report_crule_list(struct Client* to, int mask)
   }
 }
 
+/*
+ * {CONF_KILL, RPL_STATSKLINE, 'K'},
+ * {CONF_IPKILL, RPL_STATSKLINE, 'k'},
+ */
+void report_deny_list(struct Client* to)
+{
+  const struct DenyConf* p = conf_get_deny_list();
+  for ( ; p; p = p->next)
+    send_reply(to, RPL_STATSKLINE, (p->ip_kill) ? 'k' : 'K',
+               p->hostmask, p->message, p->usermask);
+}
+
 /* m_stats is so obnoxiously full of special cases that the different
  * hunt_server() possiblites were becoming very messy. It now uses a
  * switch() so as to be easier to read and update as params change.