Merge pull request #158 from awilfox/av2desc

Add AV2 descriptions to core modules
This commit is contained in:
William Pitcock 2016-03-07 00:58:54 -06:00
commit d2ba0399c0
6 changed files with 13 additions and 6 deletions

View file

@ -48,6 +48,7 @@
static int m_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int m_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
static int ms_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int ms_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
static const char ban_desc[] = "Provides the TS6 BAN command for propagating network-wide bans";
struct Message ban_msgtab = { struct Message ban_msgtab = {
"BAN", 0, 0, 0, 0, "BAN", 0, 0, 0, 0,
@ -55,7 +56,7 @@ struct Message ban_msgtab = {
}; };
mapi_clist_av1 ban_clist[] = { &ban_msgtab, NULL }; mapi_clist_av1 ban_clist[] = { &ban_msgtab, NULL };
DECLARE_MODULE_AV2(ban, NULL, NULL, ban_clist, NULL, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(ban, NULL, NULL, ban_clist, NULL, NULL, NULL, NULL, ban_desc);
static int static int
m_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) m_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])

View file

@ -39,6 +39,7 @@
static int mo_die(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int mo_die(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int me_die(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int me_die(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int do_die(struct Client *, const char *); static int do_die(struct Client *, const char *);
static const char die_desc[] = "Provides the DIE command to allow an operator to shutdown a server";
static struct Message die_msgtab = { static struct Message die_msgtab = {
"DIE", 0, 0, 0, 0, "DIE", 0, 0, 0, 0,
@ -47,7 +48,7 @@ static struct Message die_msgtab = {
mapi_clist_av1 die_clist[] = { &die_msgtab, NULL }; mapi_clist_av1 die_clist[] = { &die_msgtab, NULL };
DECLARE_MODULE_AV2(die, NULL, NULL, die_clist, NULL, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(die, NULL, NULL, die_clist, NULL, NULL, NULL, NULL, die_desc);
/* /*
* mo_die - DIE command handler * mo_die - DIE command handler

View file

@ -45,6 +45,7 @@
static int m_join(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int m_join(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int ms_join(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_join(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int ms_sjoin(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int ms_sjoin(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static const char join_desc[] = "Provides the JOIN and TS6 SJOIN commands to facilitate joining and creating channels";
static int h_can_create_channel; static int h_can_create_channel;
static int h_channel_join; static int h_channel_join;
@ -67,7 +68,7 @@ mapi_hlist_av1 join_hlist[] = {
{ NULL, NULL }, { NULL, NULL },
}; };
DECLARE_MODULE_AV2(join, NULL, NULL, join_clist, join_hlist, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(join, NULL, NULL, join_clist, join_hlist, NULL, NULL, NULL, join_desc);
static void do_join_0(struct Client *client_p, struct Client *source_p); static void do_join_0(struct Client *client_p, struct Client *source_p);
static int check_channel_name_loc(struct Client *source_p, const char *name); static int check_channel_name_loc(struct Client *source_p, const char *name);

View file

@ -39,6 +39,7 @@
static int m_kick(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int m_kick(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
#define mg_kick { m_kick, 3 } #define mg_kick { m_kick, 3 }
static const char kick_desc[] = "Provides the KICK command to remove a user from a channel";
struct Message kick_msgtab = { struct Message kick_msgtab = {
"KICK", 0, 0, 0, 0, "KICK", 0, 0, 0, 0,
@ -47,7 +48,7 @@ struct Message kick_msgtab = {
mapi_clist_av1 kick_clist[] = { &kick_msgtab, NULL }; mapi_clist_av1 kick_clist[] = { &kick_msgtab, NULL };
DECLARE_MODULE_AV2(kick, NULL, NULL, kick_clist, NULL, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(kick, NULL, NULL, kick_clist, NULL, NULL, NULL, NULL, kick_desc);
/* /*
** m_kick ** m_kick

View file

@ -45,6 +45,7 @@ static int ms_kill(struct MsgBuf *, struct Client *, struct Client *, int, const
static int mo_kill(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int mo_kill(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static void relay_kill(struct Client *, struct Client *, struct Client *, static void relay_kill(struct Client *, struct Client *, struct Client *,
const char *, const char *); const char *, const char *);
static const char kill_desc[] = "Provides the KILL command to remove a user from the network";
struct Message kill_msgtab = { struct Message kill_msgtab = {
"KILL", 0, 0, 0, 0, "KILL", 0, 0, 0, 0,
@ -58,7 +59,7 @@ mapi_hlist_av1 kill_hlist[] = {
{ NULL, NULL}, { NULL, NULL},
}; };
DECLARE_MODULE_AV2(kill, NULL, NULL, kill_clist, kill_hlist, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(kill, NULL, NULL, kill_clist, kill_hlist, NULL, NULL, NULL, kill_desc);
/* /*
** mo_kill ** mo_kill

View file

@ -47,6 +47,8 @@
static int m_message(enum message_type, struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int m_message(enum message_type, struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int m_privmsg(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int m_privmsg(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int m_notice(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static int m_notice(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static const char message_desc[] =
"Provides the PRIVMSG and NOTICE commands to send messages to users and channels";
static void expire_tgchange(void *unused); static void expire_tgchange(void *unused);
static struct ev_entry *expire_tgchange_event; static struct ev_entry *expire_tgchange_event;
@ -76,7 +78,7 @@ struct Message notice_msgtab = {
mapi_clist_av1 message_clist[] = { &privmsg_msgtab, &notice_msgtab, NULL }; mapi_clist_av1 message_clist[] = { &privmsg_msgtab, &notice_msgtab, NULL };
DECLARE_MODULE_AV2(message, modinit, moddeinit, message_clist, NULL, NULL, NULL, NULL, NULL); DECLARE_MODULE_AV2(message, modinit, moddeinit, message_clist, NULL, NULL, NULL, NULL, message_desc);
struct entity struct entity
{ {