2008-04-08 21:24:47 +02:00
|
|
|
/* SSL extban type: matches ssl users */
|
2008-04-08 19:24:23 +02:00
|
|
|
|
2016-08-18 07:33:38 +02:00
|
|
|
namespace mode = ircd::chan::mode;
|
2016-08-17 05:01:20 +02:00
|
|
|
namespace ext = mode::ext;
|
2016-08-13 05:05:54 +02:00
|
|
|
using namespace ircd;
|
|
|
|
|
2016-03-09 08:29:41 +01:00
|
|
|
static const char extb_desc[] = "SSL/TLS ($z) extban type";
|
|
|
|
|
2008-04-08 19:24:23 +02:00
|
|
|
static int _modinit(void);
|
|
|
|
static void _moddeinit(void);
|
2016-08-18 07:33:38 +02:00
|
|
|
static int eb_ssl(const char *data, struct Client *client_p, chan::chan *chptr, mode::type);
|
2008-04-08 19:24:23 +02:00
|
|
|
|
2016-03-07 07:31:41 +01:00
|
|
|
DECLARE_MODULE_AV2(extb_ssl, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, extb_desc);
|
2008-04-08 19:24:23 +02:00
|
|
|
|
|
|
|
static int
|
|
|
|
_modinit(void)
|
|
|
|
{
|
2016-08-17 05:01:20 +02:00
|
|
|
ext::table['z'] = eb_ssl;
|
2008-04-08 19:24:23 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_moddeinit(void)
|
|
|
|
{
|
2016-08-17 05:01:20 +02:00
|
|
|
ext::table['z'] = NULL;
|
2008-04-08 19:24:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static int eb_ssl(const char *data, struct Client *client_p,
|
2016-08-18 07:33:38 +02:00
|
|
|
chan::chan *chptr, mode::type type)
|
2008-04-08 19:24:23 +02:00
|
|
|
{
|
2016-08-17 05:01:20 +02:00
|
|
|
using namespace ext;
|
2008-04-08 19:24:23 +02:00
|
|
|
|
|
|
|
(void)chptr;
|
|
|
|
if (data != NULL)
|
2016-08-17 05:01:20 +02:00
|
|
|
return INVALID;
|
|
|
|
|
|
|
|
return IsSSLClient(client_p) ? MATCH : NOMATCH;
|
2008-04-08 19:24:23 +02:00
|
|
|
}
|