]> jfr.im git - irc/rqf/shadowircd.git/blob - extensions/chm_quietunreg_compat.c
SSL options added to configuration files
[irc/rqf/shadowircd.git] / extensions / chm_quietunreg_compat.c
1 /*
2 * Treat cmode +-R as +-q $~a.
3 * -- jilles
4 */
5
6 #include "stdinc.h"
7 #include "modules.h"
8 #include "client.h"
9 #include "hook.h"
10 #include "ircd.h"
11
12 /* XXX prototypes */
13 void chm_ban(struct Client *source_p, struct Channel *chptr,
14 int alevel, int parc, int *parn,
15 const char **parv, int *errors, int dir, char c, long mode_type);
16 void chm_nosuch(struct Client *source_p, struct Channel *chptr,
17 int alevel, int parc, int *parn,
18 const char **parv, int *errors, int dir, char c, long mode_type);
19 /* end yucky prototypes */
20
21 static int _modinit(void);
22 static void _moddeinit(void);
23 static void chm_quietunreg(struct Client *source_p, struct Channel *chptr,
24 int alevel, int parc, int *parn,
25 const char **parv, int *errors, int dir, char c, long mode_type);
26
27 DECLARE_MODULE_AV1(chm_quietunreg_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$");
28
29 static int
30 _modinit(void)
31 {
32 chmode_table['R'].set_func = chm_quietunreg;
33 chmode_table['R'].mode_type = 0;
34
35 return 0;
36 }
37
38 static void
39 _moddeinit(void)
40 {
41 chmode_table['R'].set_func = chm_nosuch;
42 chmode_table['R'].mode_type = 0;
43 }
44
45 static void
46 chm_quietunreg(struct Client *source_p, struct Channel *chptr,
47 int alevel, int parc, int *parn,
48 const char **parv, int *errors, int dir, char c, long mode_type)
49 {
50 int newparn = 0;
51 const char *newparv[] = { "$~a" };
52
53 if (MyClient(source_p))
54 chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
55 errors, dir, 'q', CHFL_QUIET);
56 else
57 chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
58 errors, dir, c, mode_type);
59 }