diff --git a/extensions/chm_adminonly.c b/extensions/chm_adminonly.c index c478e91e..81e70a6e 100644 --- a/extensions/chm_adminonly.c +++ b/extensions/chm_adminonly.c @@ -11,6 +11,8 @@ #include "chmode.h" static void h_can_join(hook_data_channel *); +static const char chm_adminonly_desc[] = + "Enables channel mode +A that blocks non-admins from joining a channel"; mapi_hfn_list_av1 adminonly_hfnlist[] = { { "can_join", (hookfn) h_can_join }, @@ -35,7 +37,7 @@ _moddeinit(void) cflag_orphan('A'); } -DECLARE_MODULE_AV1(chm_adminonly, _modinit, _moddeinit, NULL, NULL, adminonly_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_adminonly, _modinit, _moddeinit, NULL, NULL, adminonly_hfnlist, NULL, NULL, chm_adminonly_desc); static void h_can_join(hook_data_channel *data) diff --git a/extensions/chm_insecure.c b/extensions/chm_insecure.c index 9fee15d9..b7ccd2f1 100644 --- a/extensions/chm_insecure.c +++ b/extensions/chm_insecure.c @@ -11,6 +11,9 @@ #include "chmode.h" static void h_can_join(hook_data_channel *); +static const char chm_insecure_desc[] = + "Adds channel mode +U that allows non-SSL users to join a channel, " + "disallowing them by default"; mapi_hfn_list_av1 sslonly_hfnlist[] = { { "can_join", (hookfn) h_can_join }, @@ -36,7 +39,7 @@ _moddeinit(void) cflag_orphan('U'); } -DECLARE_MODULE_AV1(chm_insecure, _modinit, _moddeinit, NULL, NULL, sslonly_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_insecure, _modinit, _moddeinit, NULL, NULL, sslonly_hfnlist, NULL, NULL, chm_insecure_desc); static void h_can_join(hook_data_channel *data) diff --git a/extensions/chm_nonotice.c b/extensions/chm_nonotice.c index a2fa3603..1948d74d 100644 --- a/extensions/chm_nonotice.c +++ b/extensions/chm_nonotice.c @@ -38,6 +38,8 @@ static unsigned int mode_nonotice; static void chm_nonotice_process(hook_data_privmsg_channel *); +static const char chm_nonotice_desc[] = + "Adds channel mode +T which blocks notices to the channel."; mapi_hfn_list_av1 chm_nonotice_hfnlist[] = { { "privmsg_channel", (hookfn) chm_nonotice_process }, @@ -76,4 +78,4 @@ _moddeinit(void) cflag_orphan('T'); } -DECLARE_MODULE_AV1(chm_nonotice, _modinit, _moddeinit, NULL, NULL, chm_nonotice_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_nonotice, _modinit, _moddeinit, NULL, NULL, chm_nonotice_hfnlist, NULL, NULL, chm_nonotice_desc); diff --git a/extensions/chm_operonly.c b/extensions/chm_operonly.c index 5cb87ab3..458190dc 100644 --- a/extensions/chm_operonly.c +++ b/extensions/chm_operonly.c @@ -11,6 +11,8 @@ #include "chmode.h" static void h_can_join(hook_data_channel *); +static const char chm_operonly_desc[] = + "Adds channel mode +O which makes a channel operator-only"; mapi_hfn_list_av1 operonly_hfnlist[] = { { "can_join", (hookfn) h_can_join }, @@ -19,10 +21,6 @@ mapi_hfn_list_av1 operonly_hfnlist[] = { static unsigned int mymode; -/* This is a simple example of how to use dynamic channel modes. - * Not tested enough yet, use at own risk. - * -- dwr - */ static int _modinit(void) { @@ -40,7 +38,7 @@ _moddeinit(void) cflag_orphan('O'); } -DECLARE_MODULE_AV1(chm_operonly, _modinit, _moddeinit, NULL, NULL, operonly_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_operonly, _modinit, _moddeinit, NULL, NULL, operonly_hfnlist, NULL, NULL, chm_operonly_desc); static void h_can_join(hook_data_channel *data) diff --git a/extensions/chm_operonly_compat.c b/extensions/chm_operonly_compat.c index 73fe2690..86472a1c 100644 --- a/extensions/chm_operonly_compat.c +++ b/extensions/chm_operonly_compat.c @@ -14,8 +14,10 @@ static void _moddeinit(void); static void chm_operonly(struct Client *source_p, struct Channel *chptr, int alevel, int parc, int *parn, const char **parv, int *errors, int dir, char c, long mode_type); +static const char chm_operonly_compat[] = + "Adds an emulated channel mode +O which is converted into mode +i and +I $o"; -DECLARE_MODULE_AV1(chm_operonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$"); +DECLARE_MODULE_AV2(chm_operonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, chm_operonly_compat); static int _modinit(void) diff --git a/extensions/chm_operpeace.c b/extensions/chm_operpeace.c index aaa40dc8..70a20744 100644 --- a/extensions/chm_operpeace.c +++ b/extensions/chm_operpeace.c @@ -19,6 +19,8 @@ #include "chmode.h" static void hdl_can_kick(hook_data_channel_approval *); +static const char chm_operpeace_desc[] = + "Adds channel mode +M which prohibits operators from being kicked"; mapi_hfn_list_av1 chm_operpeace_hfnlist[] = { { "can_kick", (hookfn) hdl_can_kick }, @@ -43,7 +45,7 @@ _moddeinit(void) cflag_orphan('M'); } -DECLARE_MODULE_AV1(chm_operpeace, _modinit, _moddeinit, NULL, NULL, chm_operpeace_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_operpeace, _modinit, _moddeinit, NULL, NULL, chm_operpeace_hfnlist, NULL, NULL, chm_operpeace_desc); static void hdl_can_kick(hook_data_channel_approval *data) diff --git a/extensions/chm_quietunreg_compat.c b/extensions/chm_quietunreg_compat.c index a0d822d3..607a4d74 100644 --- a/extensions/chm_quietunreg_compat.c +++ b/extensions/chm_quietunreg_compat.c @@ -15,8 +15,10 @@ static void _moddeinit(void); static void chm_quietunreg(struct Client *source_p, struct Channel *chptr, int alevel, int parc, int *parn, const char **parv, int *errors, int dir, char c, long mode_type); +static const char chm_quietunreg_compat_desc[] = + "Adds an emulated channel mode +R which is converted into mode +q $~a"; -DECLARE_MODULE_AV1(chm_quietunreg_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$"); +DECLARE_MODULE_AV2(chm_quietunreg_compat, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, chm_quietunreg_compat_desc); static int _modinit(void) diff --git a/extensions/chm_sslonly.c b/extensions/chm_sslonly.c index a1bfaf75..13051bea 100644 --- a/extensions/chm_sslonly.c +++ b/extensions/chm_sslonly.c @@ -19,6 +19,9 @@ mapi_hfn_list_av1 sslonly_hfnlist[] = { static unsigned int mymode; +static const char chm_sslonly_desc[] = + "Adds channel mode +S that bans non-SSL users from joing a channel"; + static int _modinit(void) { @@ -29,14 +32,13 @@ _modinit(void) return 0; } - static void _moddeinit(void) { cflag_orphan('S'); } -DECLARE_MODULE_AV1(chm_sslonly, _modinit, _moddeinit, NULL, NULL, sslonly_hfnlist, "$Revision$"); +DECLARE_MODULE_AV2(chm_sslonly, _modinit, _moddeinit, NULL, NULL, sslonly_hfnlist, NULL, NULL, chm_sslonly_desc); static void h_can_join(hook_data_channel *data) diff --git a/extensions/chm_sslonly_compat.c b/extensions/chm_sslonly_compat.c index 63b875e5..1c50ba77 100644 --- a/extensions/chm_sslonly_compat.c +++ b/extensions/chm_sslonly_compat.c @@ -14,8 +14,10 @@ static void _moddeinit(void); static void chm_sslonly(struct Client *source_p, struct Channel *chptr, int alevel, int parc, int *parn, const char **parv, int *errors, int dir, char c, long mode_type); +static const char chm_sslonly_compat_desc[] = + "Adds an emulated channel mode +S which is converted into mode +b $~z"; -DECLARE_MODULE_AV1(chm_sslonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$"); +DECLARE_MODULE_AV2(chm_sslonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, chm_sslonly_compat_desc); static int _modinit(void)