]>
Commit | Line | Data |
---|---|---|
dbbe26fa | 1 | /* SSL extban type: matches ssl users */ |
0e51998b VY |
2 | |
3 | #include "stdinc.h" | |
4 | #include "modules.h" | |
5 | #include "client.h" | |
6 | #include "ircd.h" | |
7 | ||
8 | static int _modinit(void); | |
9 | static void _moddeinit(void); | |
10 | static int eb_ssl(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type); | |
c81afd15 | 11 | static const char extb_desc[] = "SSL/TLS ($z) extban type"; |
0e51998b | 12 | |
c81afd15 | 13 | DECLARE_MODULE_AV2(extb_ssl, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, extb_desc); |
0e51998b VY |
14 | |
15 | static int | |
16 | _modinit(void) | |
17 | { | |
18 | extban_table['z'] = eb_ssl; | |
19 | ||
20 | return 0; | |
21 | } | |
22 | ||
23 | static void | |
24 | _moddeinit(void) | |
25 | { | |
26 | extban_table['z'] = NULL; | |
27 | } | |
28 | ||
29 | static int eb_ssl(const char *data, struct Client *client_p, | |
30 | struct Channel *chptr, long mode_type) | |
31 | { | |
32 | ||
33 | (void)chptr; | |
34 | (void)mode_type; | |
0e51998b VY |
35 | if (data != NULL) |
36 | return EXTBAN_INVALID; | |
37 | return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH; | |
38 | } |