+2005-03-29 Michael Poole <mdpoole@troilus.org>
+
+ * doc/example.conf: Add HIS_STATS_J entry.
+
+ * doc/readme.features: Likewise.
+
+2005-03-25 Reed Loden <reed@reedloden.com>
+
+ * include/hash.h: Add needed prototypes for new
+ stats_nickjupes() function.
+
+ * include/ircd_features.h: Add FEAT_HIS_STATS_J.
+
+ * include/numeric.h: Add RPL_STATSJLINE (222) for new nick
+ jupes stats. Correct a typo in a comment.
+
+ * ircd/hash.c: Add stats_nickjupes() function to report all
+ nick jupes to an oper. Because of the nature of hash tables,
+ there is no way to sort this list so the results look weird.
+
+ * ircd/ircd_features.c: Add FEAT_HIS_STATS_J (default: TRUE).
+
+ * ircd/s_err.c: Add RPL_STATSJLINE (222) for new nick jupes
+ stats.
+
+ * ircd/s_stats.c: Add RPL_STATSJLINE (222) for new nick jupes
+ stats. Make 'j' case sensitive. Modify the comment for stats
+ uworld.
+
2005-03-27 Michael Poole <mdpoole@troilus.org>
* ircd/m_burst.c (ms_burst): Do not send numeric oplevels in a -A
# "HIS_STATS_h" = "TRUE";
# "HIS_STATS_i" = "TRUE";
# "HIS_STATS_j" = "TRUE";
+# "HIS_STATS_J" = "TRUE";
# "HIS_STATS_k" = "TRUE";
# "HIS_STATS_l" = "TRUE";
# "HIS_STATS_L" = "TRUE";
As per UnderNet CFV-165, this removes /STATS j from users.
+HIS_STATS_J
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes /STATS J from users.
+
HIS_STATS_M
* Type: boolean
* Default: TRUE
struct Client;
struct Channel;
+struct StatDesc;
/*
* general defines
extern int isNickJuped(const char *nick);
extern int addNickJupes(const char *nicks);
extern void clearNickJupes(void);
+extern void stats_nickjupes(struct Client* to, const struct StatDesc* sd,
+ char* param);
extern void list_next_channels(struct Client *cptr);
#endif /* INCLUDED_hash_h */
FEAT_HIS_STATS_f,
FEAT_HIS_STATS_i,
FEAT_HIS_STATS_j,
+ FEAT_HIS_STATS_J,
FEAT_HIS_STATS_M,
FEAT_HIS_STATS_m,
FEAT_HIS_STATS_o,
#define RPL_STATSNLINE 214 /* unused */
#define RPL_STATSILINE 215
#define RPL_STATSKLINE 216
-#define RPL_STATSPLINE 217 /* Undernet extenstion */
+#define RPL_STATSPLINE 217 /* Undernet extension */
/* RPL_STATSQLINE 217 Various */
#define RPL_STATSYLINE 218
#define RPL_ENDOFSTATS 219 /* See also RPL_STATSDLINE */
/* RPL_STATSBLINE 220 Numerics List: Dalnet,unreal */
#define RPL_UMODEIS 221
/* RPL_SQLINE_NICK 222 Numerics List: Dalnet */
+#define RPL_STATSJLINE 222 /* Undernet extension */
/* RPL_STATSELINE 223 dalnet */
/* RPL_STATSGLINE 223 unreal */
/* RPL_STATSFLINE 224 Hybrid extension,Dalnet */
jupeTable[i][0] = '\000';
}
+/** Report all nick jupes to a user.
+ * @param[in] to Client requesting statistics.
+ * @param[in] sd Stats descriptor for request (ignored).
+ * @param[in] param Extra parameter from user (ignored).
+ */
+void
+stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param)
+{
+ int i;
+ for (i = 0; i < JUPEHASHSIZE; i++)
+ if (jupeTable[i][0])
+ send_reply(to, RPL_STATSJLINE, jupeTable[i]);
+}
+
/** Send more channels to a client in mid-LIST.
* @param[in] cptr Client to send the list to.
*/
F_B(HIS_STATS_f, 0, 1, 0),
F_B(HIS_STATS_i, 0, 1, 0),
F_B(HIS_STATS_j, 0, 1, 0),
+ F_B(HIS_STATS_J, 0, 1, 0),
F_B(HIS_STATS_M, 0, 1, 0),
F_B(HIS_STATS_m, 0, 1, 0),
F_B(HIS_STATS_o, 0, 1, 0),
/* 221 */
{ RPL_UMODEIS, "%s", "221" },
/* 222 */
- { 0 },
+ { RPL_STATSJLINE, "J %s", "222" },
/* 223 */
{ 0 },
/* 224 */
#include "class.h"
#include "client.h"
#include "gline.h"
+#include "hash.h"
#include "ircd.h"
#include "ircd_chattr.h"
#include "ircd_events.h"
{ 'i', "access", (STAT_FLAG_OPERFEAT | STAT_FLAG_VARPARAM), FEAT_HIS_STATS_i,
stats_access, CONF_CLIENT,
"Connection authorization lines." },
- { 'j', "histogram", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_j,
+ { 'j', "histogram", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_j,
msgq_histogram, 0,
"Message length histogram." },
+ { 'J', "jupes", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_J,
+ stats_nickjupes, 0,
+ "Nickname jupes." },
{ 'k', "klines", (STAT_FLAG_OPERFEAT | STAT_FLAG_VARPARAM), FEAT_HIS_STATS_k,
stats_klines, 0,
"Local bans (K-Lines)." },
"Local connection statistics (Total SND/RCV, etc)." },
{ 'U', "uworld", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_U,
stats_configured_links, CONF_UWORLD,
- "Service server & nick jupes information." },
+ "Service server information." },
{ 'u', "uptime", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_u,
stats_uptime, 0,
"Current uptime & highest connection count." },