0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-05 13:28:54 +01:00
construct/extensions/extb_ssl.cc

40 lines
789 B
C++
Raw Normal View History

2008-04-08 21:24:47 +02:00
/* SSL extban type: matches ssl users */
2008-04-08 19:24:23 +02:00
namespace mode = ircd::chan::mode;
namespace ext = mode::ext;
2016-08-13 05:05:54 +02:00
using namespace ircd;
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);
static int eb_ssl(const char *data, struct Client *client_p, chan::chan *chptr, mode::type);
2008-04-08 19:24:23 +02: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)
{
ext::table['z'] = eb_ssl;
2008-04-08 19:24:23 +02:00
return 0;
}
static void
_moddeinit(void)
{
ext::table['z'] = NULL;
2008-04-08 19:24:23 +02:00
}
static int eb_ssl(const char *data, struct Client *client_p,
chan::chan *chptr, mode::type type)
2008-04-08 19:24:23 +02:00
{
using namespace ext;
2008-04-08 19:24:23 +02:00
(void)chptr;
if (data != NULL)
return INVALID;
return IsSSLClient(client_p) ? MATCH : NOMATCH;
2008-04-08 19:24:23 +02:00
}