Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/VibeDevelopers/Comet.
Something went wrong. Try again.
892 B · 38 lines
C
at dev
123456789101112131415161718192021222324252627282930313233343536373839/* * 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 inteb_hostmask(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type){ if (banstr == NULL) return EXTBAN_INVALID; return client_matches_mask(client_p, banstr) ? EXTBAN_MATCH : EXTBAN_NOMATCH;}