]> jfr.im git - solanum.git/blob - extensions/extb_ssl.c
Merge branch 'master' of github.com:charybdis-ircd/charybdis into elizafox-cleanups
[solanum.git] / extensions / extb_ssl.c
1 /* SSL extban type: matches ssl users */
2
3 #include "stdinc.h"
4 #include "modules.h"
5 #include "client.h"
6 #include "ircd.h"
7
8 static const char extb_desc[] = "SSL/TLS ($z) extban type";
9
10 static int _modinit(void);
11 static void _moddeinit(void);
12 static int eb_ssl(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
13
14 DECLARE_MODULE_AV2(extb_ssl, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, extb_desc);
15
16 static int
17 _modinit(void)
18 {
19 extban_table['z'] = eb_ssl;
20
21 return 0;
22 }
23
24 static void
25 _moddeinit(void)
26 {
27 extban_table['z'] = NULL;
28 }
29
30 static int eb_ssl(const char *data, struct Client *client_p,
31 struct Channel *chptr, long mode_type)
32 {
33
34 (void)chptr;
35 (void)mode_type;
36 if (data != NULL)
37 return EXTBAN_INVALID;
38 return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
39 }