]>
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.
6 * $Id: extb_realname.c 1339 2006-05-17 00:45:40Z nenolod $
14 static int _modinit(void);
15 static void _moddeinit(void);
16 static int eb_extended(const char *data
, struct Client
*client_p
, struct Channel
*chptr
, long mode_type
);
18 DECLARE_MODULE_AV1(extb_extended
, _modinit
, _moddeinit
, NULL
, NULL
, NULL
, "$Revision: 1339 $");
23 extban_table
['x'] = eb_extended
;
31 extban_table
['x'] = NULL
;
34 static int eb_extended(const char *data
, struct Client
*client_p
,
35 struct Channel
*chptr
, long mode_type
)
43 return EXTBAN_INVALID
;
45 rb_snprintf(buf
, BUFSIZE
, "%s!%s@%s#%s",
46 client_p
->name
, client_p
->username
, client_p
->host
, client_p
->info
);
48 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;
50 if (ret
== EXTBAN_NOMATCH
&& IsDynSpoof(client_p
))
52 rb_snprintf(buf
, BUFSIZE
, "%s!%s@%s#%s",
53 client_p
->name
, client_p
->username
, client_p
->orighost
, client_p
->info
);
55 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;