#include <stdlib.h>
#include <string.h>
+/*
+ * Help info displayed when user provides no stats parameter. --Gte
+ */
+const char *statsinfo[] = {
+ "The following statistics are available:",
+ "U - Service server & nick jupes information.",
+ "u - Current uptime & highest connection count.",
+ "p - Listening ports.",
+ "i - Connection authorisation lines.",
+ "y - Connection classes.",
+ "c - Remote server connection lines.",
+ "h - Hubs information (Oper only).",
+ "d - Dynamic routing configuration.",
+ "l - Current connections information.",
+ "g - Global bans (G-lines).",
+ "k - Local bans (K-Lines).",
+ "o - Operator information.",
+ "m - Message usage information.",
+ "t - Local connection statistics (Total SND/RCV, etc).",
+ "w - Userload statistics.",
+ "M - Memory allocation & leak monitoring.",
+ "z - Memory/Structure allocation information.",
+ "r - System resource usage (Debug only).",
+ "x - List usage information (Debug only).",
+ 0,
+};
+
/*
* m_stats - generic message handler
*
struct Gline* gline;
struct ConfItem *aconf;
char stat = parc > 1 ? parv[1][0] : '\0';
+ const char **infotext = statsinfo;
int i;
/* m_stats is so obnoxiously full of special cases that the different
break;
default:
stat = '*';
+ while (*infotext) sendto_one(sptr, ":%s NOTICE %s :%s", me.name, parv[0], *infotext++);
break;
}
sendto_one(sptr, rpl_str(RPL_ENDOFSTATS), me.name, parv[0], stat);
struct Gline* gline;
struct ConfItem *aconf;
char stat = parc > 1 ? parv[1][0] : '\0';
+ const char **infotext = statsinfo;
int i;
/* m_stats is so obnoxiously full of special cases that the different
break;
default:
stat = '*';
+ while (*infotext) sendto_one(sptr, ":%s NOTICE %s :%s", me.name, parv[0], *infotext++);
break;
}
sendto_one(sptr, rpl_str(RPL_ENDOFSTATS), me.name, parv[0], stat);