From d5d3540913c2e09c1a22412c26e1ecfe49f9f019 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 01:47:40 -0600 Subject: [PATCH 1/9] modules: Add AV2 descriptions to all m_p* modules --- modules/m_pass.c | 3 ++- modules/m_ping.c | 4 +++- modules/m_pong.c | 3 ++- modules/m_post.c | 4 +++- modules/m_privs.c | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/m_pass.c b/modules/m_pass.c index 9dc36c06..ad25522b 100644 --- a/modules/m_pass.c +++ b/modules/m_pass.c @@ -36,6 +36,7 @@ #include "s_conf.h" static int mr_pass(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char pass_desc[] = "Provides the PASS command to authenticate clients and servers"; struct Message pass_msgtab = { "PASS", 0, 0, 0, 0, @@ -43,7 +44,7 @@ struct Message pass_msgtab = { }; mapi_clist_av1 pass_clist[] = { &pass_msgtab, NULL }; -DECLARE_MODULE_AV2(pass, NULL, NULL, pass_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(pass, NULL, NULL, pass_clist, NULL, NULL, NULL, NULL, pass_desc); /* * m_pass() - Added Sat, 4 March 1989 diff --git a/modules/m_ping.c b/modules/m_ping.c index 1d9f87a3..e9063271 100644 --- a/modules/m_ping.c +++ b/modules/m_ping.c @@ -37,6 +37,8 @@ static int m_ping(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_ping(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char ping_desc[] = + "Provides the PING command to ensure a client or server is still alive"; struct Message ping_msgtab = { "PING", 0, 0, 0, 0, @@ -44,7 +46,7 @@ struct Message ping_msgtab = { }; mapi_clist_av1 ping_clist[] = { &ping_msgtab, NULL }; -DECLARE_MODULE_AV2(ping, NULL, NULL, ping_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(ping, NULL, NULL, ping_clist, NULL, NULL, NULL, NULL, ping_desc); /* ** m_ping diff --git a/modules/m_pong.c b/modules/m_pong.c index b09b68f5..3c2b244b 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -40,6 +40,7 @@ static int mr_pong(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_pong(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char pong_desc[] = "Provides the PONG command to respond to a PING message"; struct Message pong_msgtab = { "PONG", 0, 0, 0, 0, @@ -47,7 +48,7 @@ struct Message pong_msgtab = { }; mapi_clist_av1 pong_clist[] = { &pong_msgtab, NULL }; -DECLARE_MODULE_AV2(pong, NULL, NULL, pong_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(pong, NULL, NULL, pong_clist, NULL, NULL, NULL, NULL, pong_desc); static int ms_pong(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) diff --git a/modules/m_post.c b/modules/m_post.c index 91d95bf4..d3923c4c 100644 --- a/modules/m_post.c +++ b/modules/m_post.c @@ -34,6 +34,8 @@ #include "s_conf.h" static int mr_dumb_proxy(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char post_desc[] = + "Ensure Web forms/proxies cannot connect by disconnecting on POST, GET, and PUT"; struct Message post_msgtab = { "POST", 0, 0, 0, 0, @@ -52,7 +54,7 @@ struct Message put_msgtab = { mapi_clist_av1 post_clist[] = { &post_msgtab, &get_msgtab, &put_msgtab, NULL }; -DECLARE_MODULE_AV2(post, NULL, NULL, post_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(post, NULL, NULL, post_clist, NULL, NULL, NULL, NULL, post_desc); /* diff --git a/modules/m_privs.c b/modules/m_privs.c index eb8b3908..fca73bf1 100644 --- a/modules/m_privs.c +++ b/modules/m_privs.c @@ -43,6 +43,7 @@ static int m_privs(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int me_privs(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int mo_privs(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static const char privs_desc[] = "Provides the PRIVS command to inspect an operator's privileges"; struct Message privs_msgtab = { "PRIVS", 0, 0, 0, 0, @@ -73,7 +74,7 @@ static struct mode_table auth_client_table[] = { {NULL, 0} }; -DECLARE_MODULE_AV2(privs, NULL, NULL, privs_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(privs, NULL, NULL, privs_clist, NULL, NULL, NULL, NULL, privs_desc); static void show_privs(struct Client *source_p, struct Client *target_p) { From 114d98b3cc432070039ddb57be67b5124286d1cd Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 01:52:45 -0600 Subject: [PATCH 2/9] modules: Add AV2 descriptions to all m_r* modules --- modules/m_rehash.c | 4 +++- modules/m_restart.c | 3 ++- modules/m_resv.c | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/m_rehash.c b/modules/m_rehash.c index 2dd96bc5..9d0af3db 100644 --- a/modules/m_rehash.c +++ b/modules/m_rehash.c @@ -46,6 +46,8 @@ static int mo_rehash(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_rehash(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char rehash_desc[] = + "Provides the REHASH command to reload configuration and other files"; struct Message rehash_msgtab = { "REHASH", 0, 0, 0, 0, @@ -53,7 +55,7 @@ struct Message rehash_msgtab = { }; mapi_clist_av1 rehash_clist[] = { &rehash_msgtab, NULL }; -DECLARE_MODULE_AV2(rehash, NULL, NULL, rehash_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(rehash, NULL, NULL, rehash_clist, NULL, NULL, NULL, NULL, rehash_desc); struct hash_commands { diff --git a/modules/m_restart.c b/modules/m_restart.c index de229c69..114ee361 100644 --- a/modules/m_restart.c +++ b/modules/m_restart.c @@ -41,6 +41,7 @@ static int mo_restart(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_restart(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int do_restart(struct Client *source_p, const char *servername); +static const char restart_desc[] = "Provides the RESTART command to restart the server"; struct Message restart_msgtab = { "RESTART", 0, 0, 0, 0, @@ -48,7 +49,7 @@ struct Message restart_msgtab = { }; mapi_clist_av1 restart_clist[] = { &restart_msgtab, NULL }; -DECLARE_MODULE_AV2(restart, NULL, NULL, restart_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(restart, NULL, NULL, restart_clist, NULL, NULL, NULL, NULL, restart_desc); /* * mo_restart diff --git a/modules/m_resv.c b/modules/m_resv.c index 9d73c8eb..8f010bcf 100644 --- a/modules/m_resv.c +++ b/modules/m_resv.c @@ -44,6 +44,8 @@ static int me_resv(struct MsgBuf *, struct Client *, struct Client *, int, const static int mo_unresv(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_unresv(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_unresv(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char resv_desc[] = + "Provides management of reserved nicknames and channels using (UN)RESV"; struct Message resv_msgtab = { "RESV", 0, 0, 0, 0, @@ -57,7 +59,7 @@ struct Message unresv_msgtab = { mapi_clist_av1 resv_clist[] = { &resv_msgtab, &unresv_msgtab, NULL }; -DECLARE_MODULE_AV2(resv, NULL, NULL, resv_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(resv, NULL, NULL, resv_clist, NULL, NULL, NULL, NULL, resv_desc); static void parse_resv(struct Client *source_p, const char *name, const char *reason, int temp_time, int propagated); From 3abc337fe1ef89bfe5539fe60e441ece2fd4be8e Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:05:28 -0600 Subject: [PATCH 3/9] modules: Add AV2 descriptions to all m_s* modules --- modules/m_sasl.c | 3 ++- modules/m_scan.c | 4 +++- modules/m_services.c | 4 +++- modules/m_set.c | 3 ++- modules/m_signon.c | 3 ++- modules/m_snote.c | 3 ++- modules/m_starttls.c | 3 ++- modules/m_stats.c | 4 +++- modules/m_svinfo.c | 4 +++- 9 files changed, 22 insertions(+), 9 deletions(-) diff --git a/modules/m_sasl.c b/modules/m_sasl.c index 6feec890..5efdf8be 100644 --- a/modules/m_sasl.c +++ b/modules/m_sasl.c @@ -44,6 +44,7 @@ static int m_authenticate(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_sasl(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_mechlist(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char sasl_desc[] = "Provides SASL authentication support"; static void abort_sasl(struct Client *); static void abort_sasl_exit(hook_data_client_exit *); @@ -115,7 +116,7 @@ _moddeinit(void) capability_orphan(cli_capindex, "sasl"); } -DECLARE_MODULE_AV2(sasl, _modinit, _moddeinit, sasl_clist, NULL, sasl_hfnlist, NULL, NULL, NULL); +DECLARE_MODULE_AV2(sasl, _modinit, _moddeinit, sasl_clist, NULL, sasl_hfnlist, NULL, NULL, sasl_desc); static int m_authenticate(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, diff --git a/modules/m_scan.c b/modules/m_scan.c index 681990ea..db41c3bb 100644 --- a/modules/m_scan.c +++ b/modules/m_scan.c @@ -52,6 +52,8 @@ static int mo_scan(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int scan_umodes(struct MsgBuf *, struct Client *, struct Client *, int, const char **); /*static int scan_cmodes(struct MsgBuf *, struct Client *, struct Client *, int, const char **);*/ +static const char scan_desc[] = + "Provides the SCAN command to show users that have a mode set or cleared"; struct Message scan_msgtab = { "SCAN", 0, 0, 0, 0, @@ -59,7 +61,7 @@ struct Message scan_msgtab = { }; mapi_clist_av1 scan_clist[] = { &scan_msgtab, NULL }; -DECLARE_MODULE_AV2(scan, NULL, NULL, scan_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(scan, NULL, NULL, scan_clist, NULL, NULL, NULL, NULL, scan_desc); typedef int (*scan_handler)(struct MsgBuf *, struct Client *, struct Client *, int, const char **); diff --git a/modules/m_services.c b/modules/m_services.c index 3b7e0475..01d21be8 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -58,6 +58,8 @@ static int me_login(struct MsgBuf *, struct Client *, struct Client *, int, cons static int me_rsfnc(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_nickdelay(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char services_desc[] = "Provides support for running a services daemon"; + static void h_svc_server_introduced(hook_data_client *); static void h_svc_whois(hook_data_client *); static void h_svc_stats(hook_data_int *); @@ -94,7 +96,7 @@ mapi_hfn_list_av1 services_hfnlist[] = { { NULL, NULL } }; -DECLARE_MODULE_AV2(services, _modinit, _moddeinit, services_clist, NULL, services_hfnlist, NULL, NULL, NULL); +DECLARE_MODULE_AV2(services, _modinit, _moddeinit, services_clist, NULL, services_hfnlist, NULL, NULL, services_desc); static int _modinit(void) diff --git a/modules/m_set.c b/modules/m_set.c index a2e5059b..ea15259e 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -40,6 +40,7 @@ #include "modules.h" static int mo_set(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char set_desc[] = "Provides the SET command to change server parameters"; struct Message set_msgtab = { "SET", 0, 0, 0, 0, @@ -47,7 +48,7 @@ struct Message set_msgtab = { }; mapi_clist_av1 set_clist[] = { &set_msgtab, NULL }; -DECLARE_MODULE_AV2(set, NULL, NULL, set_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(set, NULL, NULL, set_clist, NULL, NULL, NULL, NULL, set_desc); /* Structure used for the SET table itself */ struct SetStruct diff --git a/modules/m_signon.c b/modules/m_signon.c index 20f6b42a..c933ae66 100644 --- a/modules/m_signon.c +++ b/modules/m_signon.c @@ -51,6 +51,7 @@ static int me_svslogin(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_signon(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char signon_desc[] = "Provides account login/logout support for services"; static void send_signon(struct Client *, struct Client *, const char *, const char *, const char *, unsigned int, const char *); @@ -67,7 +68,7 @@ mapi_clist_av1 signon_clist[] = { &svslogin_msgtab, &signon_msgtab, NULL }; -DECLARE_MODULE_AV2(signon, NULL, NULL, signon_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(signon, NULL, NULL, signon_clist, NULL, NULL, NULL, NULL, signon_desc); #define NICK_VALID 1 #define USER_VALID 2 diff --git a/modules/m_snote.c b/modules/m_snote.c index a381e380..9d92a00b 100644 --- a/modules/m_snote.c +++ b/modules/m_snote.c @@ -49,6 +49,7 @@ #include "modules.h" static int me_snote(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char snote_desc[] = "Provides server notices via the SNOTE command"; struct Message snote_msgtab = { "SNOTE", 0, 0, 0, 0, @@ -56,7 +57,7 @@ struct Message snote_msgtab = { }; mapi_clist_av1 snote_clist[] = { &snote_msgtab, NULL }; -DECLARE_MODULE_AV2(snote, NULL, NULL, snote_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(snote, NULL, NULL, snote_clist, NULL, NULL, NULL, NULL, snote_desc); /* * me_snote diff --git a/modules/m_starttls.c b/modules/m_starttls.c index 3a152104..5d87f0b8 100644 --- a/modules/m_starttls.c +++ b/modules/m_starttls.c @@ -34,6 +34,7 @@ #include "logger.h" static int mr_starttls(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char starttls_desc[] = "Provides the tls CAP and STARTTLS command"; struct Message starttls_msgtab = { "STARTTLS", 0, 0, 0, 0, @@ -61,7 +62,7 @@ _moddeinit(void) #endif } -DECLARE_MODULE_AV2(starttls, _modinit, _moddeinit, starttls_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(starttls, _modinit, _moddeinit, starttls_clist, NULL, NULL, NULL, NULL, starttls_desc); static int mr_starttls(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) diff --git a/modules/m_stats.c b/modules/m_stats.c index 50fc2b40..a2cf3ceb 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -50,6 +50,8 @@ #include "sslproc.h" static int m_stats (struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char stats_desc[] = + "Provides the STATS command to inspect various server/network information"; struct Message stats_msgtab = { "STATS", 0, 0, 0, 0, @@ -66,7 +68,7 @@ mapi_hlist_av1 stats_hlist[] = { { NULL, NULL } }; -DECLARE_MODULE_AV2(stats, NULL, NULL, stats_clist, stats_hlist, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(stats, NULL, NULL, stats_clist, stats_hlist, NULL, NULL, NULL, stats_desc); const char *Lformat = "%s %u %u %u %u %u :%u %u %s"; diff --git a/modules/m_svinfo.c b/modules/m_svinfo.c index 9e2d07ba..05770ada 100644 --- a/modules/m_svinfo.c +++ b/modules/m_svinfo.c @@ -36,6 +36,8 @@ #include "modules.h" static int ms_svinfo(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char svinfo_desc[] = + "Provides TS6 SVINFO command to ensure version and clock synchronisation"; struct Message svinfo_msgtab = { "SVINFO", 0, 0, 0, 0, @@ -43,7 +45,7 @@ struct Message svinfo_msgtab = { }; mapi_clist_av1 svinfo_clist[] = { &svinfo_msgtab, NULL }; -DECLARE_MODULE_AV2(svinfo, NULL, NULL, svinfo_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(svinfo, NULL, NULL, svinfo_clist, NULL, NULL, NULL, NULL, svinfo_desc); /* * ms_svinfo - SVINFO message handler From be9c3979520b196ac324ef25a88b4539183a0dc3 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:27:32 -0600 Subject: [PATCH 4/9] modules: Add AV2 descriptions to all m_t* modules --- modules/m_tb.c | 4 +++- modules/m_testline.c | 3 ++- modules/m_testmask.c | 4 +++- modules/m_tginfo.c | 3 ++- modules/m_time.c | 4 +++- modules/m_topic.c | 4 +++- modules/m_trace.c | 4 +++- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/m_tb.c b/modules/m_tb.c index 769f773f..a66dab6b 100644 --- a/modules/m_tb.c +++ b/modules/m_tb.c @@ -44,6 +44,8 @@ static int ms_tb(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int ms_etb(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static const char tb_desc[] = + "Provides TS6 TB and ETB commands for topic bursting between servers"; struct Message tb_msgtab = { "TB", 0, 0, 0, 0, @@ -56,7 +58,7 @@ struct Message etb_msgtab = { }; mapi_clist_av1 tb_clist[] = { &tb_msgtab, &etb_msgtab, NULL }; -DECLARE_MODULE_AV2(tb, NULL, NULL, tb_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(tb, NULL, NULL, tb_clist, NULL, NULL, NULL, NULL, tb_desc); /* m_tb() * diff --git a/modules/m_testline.c b/modules/m_testline.c index 302ec86e..81358ae4 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -41,6 +41,7 @@ static int mo_testline(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int mo_testgecos(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char testline_desc[] = "Provides the ability to test I/K/D/X lines and RESVs"; struct Message testline_msgtab = { "TESTLINE", 0, 0, 0, 0, @@ -52,7 +53,7 @@ struct Message testgecos_msgtab = { }; mapi_clist_av1 testline_clist[] = { &testline_msgtab, &testgecos_msgtab, NULL }; -DECLARE_MODULE_AV2(testline, NULL, NULL, testline_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(testline, NULL, NULL, testline_clist, NULL, NULL, NULL, NULL, testline_desc); static int mo_testline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) diff --git a/modules/m_testmask.c b/modules/m_testmask.c index c46b0e0e..782be8a8 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -48,6 +48,8 @@ static int mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static const char testmask_desc[] = + "Provides the TESTMASK command to show the number of clients matching a hostmask or GECOS"; struct Message testmask_msgtab = { "TESTMASK", 0, 0, 0, 0, @@ -55,7 +57,7 @@ struct Message testmask_msgtab = { }; mapi_clist_av1 testmask_clist[] = { &testmask_msgtab, NULL }; -DECLARE_MODULE_AV2(testmask, NULL, NULL, testmask_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(testmask, NULL, NULL, testmask_clist, NULL, NULL, NULL, NULL, testmask_desc); static const char *empty_sockhost = "255.255.255.255"; static const char *spoofed_sockhost = "0"; diff --git a/modules/m_tginfo.c b/modules/m_tginfo.c index 06178ba6..027b2311 100644 --- a/modules/m_tginfo.c +++ b/modules/m_tginfo.c @@ -40,6 +40,7 @@ #include "s_newconf.h" /* add_tgchange */ static int me_tginfo(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char tginfo_desc[] = "Processes target change notifications from other servers"; struct Message tginfo_msgtab = { "TGINFO", 0, 0, 0, 0, @@ -48,7 +49,7 @@ struct Message tginfo_msgtab = { mapi_clist_av1 tginfo_clist[] = { &tginfo_msgtab, NULL }; -DECLARE_MODULE_AV2(tginfo, NULL, NULL, tginfo_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(tginfo, NULL, NULL, tginfo_clist, NULL, NULL, NULL, NULL, tginfo_desc); /* ** me_tginfo diff --git a/modules/m_time.c b/modules/m_time.c index a889dabc..9d7d3ec5 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -36,6 +36,8 @@ static int m_time(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static char *date(void); +static const char time_desc[] = + "Provides the TIME command to show the current server time": struct Message time_msgtab = { "TIME", 0, 0, 0, 0, @@ -43,7 +45,7 @@ struct Message time_msgtab = { }; mapi_clist_av1 time_clist[] = { &time_msgtab, NULL }; -DECLARE_MODULE_AV2(time, NULL, NULL, time_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(time, NULL, NULL, time_clist, NULL, NULL, NULL, NULL, time_desc); static const char *months[] = { "January", "February", "March", "April", diff --git a/modules/m_topic.c b/modules/m_topic.c index ab292f79..cfaa7833 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -43,6 +43,8 @@ static int m_topic(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_topic(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char topic_desc[] = + "Provides the TOPIC command to set, remove, and inspect channel topics"; struct Message topic_msgtab = { "TOPIC", 0, 0, 0, 0, @@ -50,7 +52,7 @@ struct Message topic_msgtab = { }; mapi_clist_av1 topic_clist[] = { &topic_msgtab, NULL }; -DECLARE_MODULE_AV2(topic, NULL, NULL, topic_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(topic, NULL, NULL, topic_clist, NULL, NULL, NULL, NULL, topic_desc); /* * m_topic diff --git a/modules/m_trace.c b/modules/m_trace.c index 239b224d..245577b4 100644 --- a/modules/m_trace.c +++ b/modules/m_trace.c @@ -41,6 +41,8 @@ #include "modules.h" static int m_trace(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char trace_desc[] = + "Provides the TRACE command to trace the route to a client or server"; static void trace_spy(struct Client *, struct Client *); @@ -56,7 +58,7 @@ mapi_hlist_av1 trace_hlist[] = { { "doing_trace", &doing_trace_hook }, { NULL, NULL } }; -DECLARE_MODULE_AV2(trace, NULL, NULL, trace_clist, trace_hlist, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(trace, NULL, NULL, trace_clist, trace_hlist, NULL, NULL, NULL, trace_desc); static void count_downlinks(struct Client *server_p, int *pservcount, int *pusercount); static int report_this_status(struct Client *source_p, struct Client *target_p); From 4855e957c5a0562ad85a75dfe75d6a41f0e8b066 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:43:11 -0600 Subject: [PATCH 5/9] modules: Add AV2 descriptions to all m_u* modules --- modules/m_unreject.c | 4 +++- modules/m_user.c | 4 +++- modules/m_userhost.c | 4 +++- modules/m_users.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/m_unreject.c b/modules/m_unreject.c index bb9e8c54..a6ae98a8 100644 --- a/modules/m_unreject.c +++ b/modules/m_unreject.c @@ -31,6 +31,8 @@ #include "send.h" static int mo_unreject(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char unreject_desc[] = + "Provides the UNREJECT command to remove an IP from the reject cache"; struct Message unreject_msgtab = { "UNREJECT", 0, 0, 0, 0, @@ -38,7 +40,7 @@ struct Message unreject_msgtab = { }; mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL }; -DECLARE_MODULE_AV2(unreject, NULL, NULL, unreject_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(unreject, NULL, NULL, unreject_clist, NULL, NULL, NULL, NULL, unreject_desc); /* * mo_unreject diff --git a/modules/m_user.c b/modules/m_user.c index f3905789..a7072054 100644 --- a/modules/m_user.c +++ b/modules/m_user.c @@ -37,6 +37,8 @@ #include "s_assert.h" static int mr_user(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char user_desc[] = + "Provides the USER command to register a new connection": struct Message user_msgtab = { "USER", 0, 0, 0, 0, @@ -44,7 +46,7 @@ struct Message user_msgtab = { }; mapi_clist_av1 user_clist[] = { &user_msgtab, NULL }; -DECLARE_MODULE_AV2(user, NULL, NULL, user_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(user, NULL, NULL, user_clist, NULL, NULL, NULL, NULL, user_desc); static int do_local_user(struct Client *client_p, struct Client *source_p, const char *username, const char *realname); diff --git a/modules/m_userhost.c b/modules/m_userhost.c index 8c745e89..e39866fe 100644 --- a/modules/m_userhost.c +++ b/modules/m_userhost.c @@ -37,6 +37,8 @@ static char buf[BUFSIZE]; static int m_userhost(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char userhost_desc[] = + "Provides the USERHOST command to show a user's host"; struct Message userhost_msgtab = { "USERHOST", 0, 0, 0, 0, @@ -44,7 +46,7 @@ struct Message userhost_msgtab = { }; mapi_clist_av1 userhost_clist[] = { &userhost_msgtab, NULL }; -DECLARE_MODULE_AV2(userhost, NULL, NULL, userhost_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(userhost, NULL, NULL, userhost_clist, NULL, NULL, NULL, NULL, userhost_desc); /* * m_userhost added by Darren Reed 13/8/91 to aid clients and reduce diff --git a/modules/m_users.c b/modules/m_users.c index d298c22d..a38e4f2c 100644 --- a/modules/m_users.c +++ b/modules/m_users.c @@ -34,6 +34,8 @@ #include "modules.h" static int m_users(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char users_desc[] = + "Provides the USERS command to display connection statistics locally and globally"; struct Message users_msgtab = { "USERS", 0, 0, 0, 0, @@ -41,7 +43,7 @@ struct Message users_msgtab = { }; mapi_clist_av1 users_clist[] = { &users_msgtab, NULL }; -DECLARE_MODULE_AV2(users, NULL, NULL, users_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(users, NULL, NULL, users_clist, NULL, NULL, NULL, NULL, users_desc); /* * m_users From 78624ddf8d74e39d7afb7dc5bd16c9dcd1150634 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:45:00 -0600 Subject: [PATCH 6/9] modules: Add AV2 description to m_version --- modules/m_version.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/m_version.c b/modules/m_version.c index 13cdb360..e9e1607b 100644 --- a/modules/m_version.c +++ b/modules/m_version.c @@ -38,6 +38,8 @@ static char *confopts(void); static int m_version(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int mo_version(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char version_desc[] = + "Provides the VERSION command to display server version information"; struct Message version_msgtab = { "VERSION", 0, 0, 0, 0, @@ -45,7 +47,7 @@ struct Message version_msgtab = { }; mapi_clist_av1 version_clist[] = { &version_msgtab, NULL }; -DECLARE_MODULE_AV2(version, NULL, NULL, version_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(version, NULL, NULL, version_clist, NULL, NULL, NULL, NULL, version_desc); /* * m_version - VERSION command handler From ae5695cdcb54238999aec8dd838934b8656d0d22 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:53:16 -0600 Subject: [PATCH 7/9] m_time and m_user: Fix small typo --- modules/m_time.c | 2 +- modules/m_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/m_time.c b/modules/m_time.c index 9d7d3ec5..d3392cb8 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -37,7 +37,7 @@ static int m_time(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static char *date(void); static const char time_desc[] = - "Provides the TIME command to show the current server time": + "Provides the TIME command to show the current server time"; struct Message time_msgtab = { "TIME", 0, 0, 0, 0, diff --git a/modules/m_user.c b/modules/m_user.c index a7072054..2a6b53fc 100644 --- a/modules/m_user.c +++ b/modules/m_user.c @@ -38,7 +38,7 @@ static int mr_user(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static const char user_desc[] = - "Provides the USER command to register a new connection": + "Provides the USER command to register a new connection"; struct Message user_msgtab = { "USER", 0, 0, 0, 0, From 3bf449fe260846736692db6c02d4a2d997ab2b9c Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:53:27 -0600 Subject: [PATCH 8/9] modules: Add AV2 descriptions for m_w* modules --- modules/m_wallops.c | 4 +++- modules/m_who.c | 4 +++- modules/m_whois.c | 4 +++- modules/m_whowas.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/m_wallops.c b/modules/m_wallops.c index 8e0ba6e9..0f551391 100644 --- a/modules/m_wallops.c +++ b/modules/m_wallops.c @@ -39,6 +39,8 @@ static int mo_operwall(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_operwall(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_wallops(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char wallops_desc[] = + "Provides the WALLOPS and OPERWALL commands to message online operators"; struct Message wallops_msgtab = { "WALLOPS", 0, 0, 0, 0, @@ -50,7 +52,7 @@ struct Message operwall_msgtab = { }; mapi_clist_av1 wallops_clist[] = { &wallops_msgtab, &operwall_msgtab, NULL }; -DECLARE_MODULE_AV2(wallops, NULL, NULL, wallops_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(wallops, NULL, NULL, wallops_clist, NULL, NULL, NULL, NULL, wallops_desc); /* * mo_operwall (write to *all* opers currently online) diff --git a/modules/m_who.c b/modules/m_who.c index f70f2d0e..5ea42ba6 100644 --- a/modules/m_who.c +++ b/modules/m_who.c @@ -62,6 +62,8 @@ struct who_format }; static int m_who(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char who_desc[] = + "Provides the WHO command to display information for users on a channel"; struct Message who_msgtab = { "WHO", 0, 0, 0, 0, @@ -82,7 +84,7 @@ _moddeinit(void) } mapi_clist_av1 who_clist[] = { &who_msgtab, NULL }; -DECLARE_MODULE_AV2(who, _modinit, _moddeinit, who_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(who, _modinit, _moddeinit, who_clist, NULL, NULL, NULL, NULL, who_desc); static void do_who_on_channel(struct Client *source_p, struct Channel *chptr, int server_oper, int member, diff --git a/modules/m_whois.c b/modules/m_whois.c index f419308c..5afa2c94 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -50,6 +50,8 @@ static void single_whois(struct Client *source_p, struct Client *target_p, int o static int m_whois(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_whois(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char whois_desc[] = + "Provides the WHOIS command to display information about a user"; struct Message whois_msgtab = { "WHOIS", 0, 0, 0, 0, @@ -68,7 +70,7 @@ mapi_hlist_av1 whois_hlist[] = { { NULL, NULL } }; -DECLARE_MODULE_AV2(whois, NULL, NULL, whois_clist, whois_hlist, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(whois, NULL, NULL, whois_clist, whois_hlist, NULL, NULL, NULL, whois_desc); /* * m_whois diff --git a/modules/m_whowas.c b/modules/m_whowas.c index 38107e93..5739dade 100644 --- a/modules/m_whowas.c +++ b/modules/m_whowas.c @@ -40,6 +40,8 @@ #include "modules.h" static int m_whowas(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char whowas_desc[] = + "Provides the WHOWAS command to display information on a disconnected user"; struct Message whowas_msgtab = { "WHOWAS", 0, 0, 0, 0, @@ -47,7 +49,7 @@ struct Message whowas_msgtab = { }; mapi_clist_av1 whowas_clist[] = { &whowas_msgtab, NULL }; -DECLARE_MODULE_AV2(whowas, NULL, NULL, whowas_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(whowas, NULL, NULL, whowas_clist, NULL, NULL, NULL, NULL, whowas_desc); /* ** m_whowas From 893806a6eaab151d8eb35c0760cd1e11658ed555 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 02:54:54 -0600 Subject: [PATCH 9/9] modules: Add AV2 description to m_xline --- modules/m_xline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/m_xline.c b/modules/m_xline.c index ec5b246a..3b61afd2 100644 --- a/modules/m_xline.c +++ b/modules/m_xline.c @@ -60,6 +60,8 @@ static int ms_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct C const char *parv[]); static int me_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static const char xline_desc[] = + "Provides management of GECOS bans via (UN)XLINE command"; struct Message xline_msgtab = { "XLINE", 0, 0, 0, 0, @@ -73,7 +75,7 @@ struct Message unxline_msgtab = { mapi_clist_av1 xline_clist[] = { &xline_msgtab, &unxline_msgtab, NULL }; -DECLARE_MODULE_AV2(xline, NULL, NULL, xline_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(xline, NULL, NULL, xline_clist, NULL, NULL, NULL, NULL, xline_desc); static int valid_xline(struct Client *, const char *, const char *); static void apply_xline(struct Client *client_p, const char *name,