]>
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
, int parc
, int *parn
,
19 const char **parv
, int *errors
, int dir
, char c
, long mode_type
);
21 DECLARE_MODULE_AV2(chm_operonly_compat
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, NULL
, NULL
, chm_operonly_compat
);
26 chmode_table
['O'].set_func
= chm_operonly
;
27 chmode_table
['O'].mode_type
= 0;
35 chmode_table
['O'].set_func
= chm_nosuch
;
36 chmode_table
['O'].mode_type
= 0;
40 chm_operonly(struct Client
*source_p
, struct Channel
*chptr
,
41 int alevel
, int parc
, int *parn
,
42 const char **parv
, int *errors
, int dir
, char c
, long mode_type
)
45 const char *newparv
[] = { "$o" };
47 if (MyClient(source_p
)) {
48 chm_simple(source_p
, chptr
, alevel
, parc
, parn
, parv
,
49 errors
, dir
, 'i', MODE_INVITEONLY
);
50 chm_ban(source_p
, chptr
, alevel
, 1, &newparn
, newparv
,
51 errors
, dir
, 'I', CHFL_INVEX
);
53 chm_nosuch(source_p
, chptr
, alevel
, parc
, parn
, parv
,
54 errors
, dir
, c
, mode_type
);