]>
jfr.im git - solanum.git/blob - extensions/extb_extgecos.c
2 * Extended extban type: bans all users with matching nick!user@host#gecos.
3 * Requested by Lockwood.
12 static int _modinit(void);
13 static void _moddeinit(void);
14 static int eb_extended(const char *data
, struct Client
*client_p
, struct Channel
*chptr
, long mode_type
);
15 static const char extb_desc
[] = "Extended mask ($x) extban type";
17 DECLARE_MODULE_AV2(extb_extended
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, NULL
, NULL
, extb_desc
);
22 extban_table
['x'] = eb_extended
;
30 extban_table
['x'] = NULL
;
33 static int eb_extended(const char *data
, struct Client
*client_p
,
34 struct Channel
*chptr
, long mode_type
)
42 return EXTBAN_INVALID
;
44 snprintf(buf
, BUFSIZE
, "%s!%s@%s#%s",
45 client_p
->name
, client_p
->username
, client_p
->host
, client_p
->info
);
47 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;
49 if (ret
== EXTBAN_NOMATCH
&& IsDynSpoof(client_p
))
51 snprintf(buf
, BUFSIZE
, "%s!%s@%s#%s",
52 client_p
->name
, client_p
->username
, client_p
->orighost
, client_p
->info
);
54 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;