mirror of
https://github.com/pissnet/angiosperm.git
synced 2024-11-14 03:14:49 +00:00
a78869aa47
in particular, we now know if masks are going to grant or deny access
36 lines
857 B
C
36 lines
857 B
C
/*
|
|
* Hostmask extban type: bans all users matching a given hostmask, used for stacked extbans
|
|
* -- kaniini
|
|
*/
|
|
|
|
#include "stdinc.h"
|
|
#include "modules.h"
|
|
#include "client.h"
|
|
#include "ircd.h"
|
|
|
|
static const char extb_desc[] = "Hostmask ($m) extban type";
|
|
|
|
static int _modinit(void);
|
|
static void _moddeinit(void);
|
|
static int eb_hostmask(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
|
|
|
DECLARE_MODULE_AV2(extb_hostmask, _modinit, _moddeinit, NULL, NULL, NULL, NULL, NULL, extb_desc);
|
|
|
|
static int
|
|
_modinit(void)
|
|
{
|
|
extban_table['m'] = eb_hostmask;
|
|
return 0;
|
|
}
|
|
|
|
static void
|
|
_moddeinit(void)
|
|
{
|
|
extban_table['m'] = NULL;
|
|
}
|
|
|
|
static int
|
|
eb_hostmask(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type)
|
|
{
|
|
return client_matches_mask(client_p, banstr, mode_type) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
|
}
|