]>
jfr.im git - solanum.git/blob - extensions/chm_operonly_compat.c
2 * Treat cmode +-O as +-iI $o.
12 static const char chm_operonly_compat
[] =
13 "Adds an emulated channel mode +O which is converted into mode +i and +I $o";
15 static int _modinit(void);
16 static void _moddeinit(void);
17 static void chm_operonly(struct Client
*source_p
, struct Channel
*chptr
,
18 int alevel
, const char *arg
, int *errors
, int dir
, char c
, long mode_type
);
20 DECLARE_MODULE_AV2(chm_operonly_compat
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, NULL
, NULL
, chm_operonly_compat
);
25 chmode_table
['O'] = (struct ChannelMode
){chm_operonly
, 0, 0};
32 chmode_table
['O'] = (struct ChannelMode
){chm_nosuch
, 0, 0};
36 chm_operonly(struct Client
*source_p
, struct Channel
*chptr
,
37 int alevel
, const char *arg
, int *errors
, int dir
, char c
, long mode_type
)
39 if (MyClient(source_p
)) {
40 chm_simple(source_p
, chptr
, alevel
, NULL
,
41 errors
, dir
, 'i', MODE_INVITEONLY
);
42 chm_ban(source_p
, chptr
, alevel
, "$o",
43 errors
, dir
, 'I', CHFL_INVEX
);
45 chm_nosuch(source_p
, chptr
, alevel
, NULL
,
46 errors
, dir
, c
, mode_type
);