From d5d3540913c2e09c1a22412c26e1ecfe49f9f019 Mon Sep 17 00:00:00 2001 From: Andrew Wilcox Date: Mon, 7 Mar 2016 01:47:40 -0600 Subject: [PATCH] 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) {