Update chm_* modules to AV2
This commit is contained in:
parent
978b723252
commit
581dad19a4
9 changed files with 29 additions and 14 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue