1 /* {{{ irc-seven: Cows like it.
3 * Copyright (C) 2006 William Pitcock.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to:
18 * Free Software Foundation, Inc.
19 * 51 Franklin St - Fifth Floor
20 * Boston, MA 02110-1301
30 static int _modinit (void);
31 static void _moddeinit (void);
32 static int eb_extended (const char *, struct Client
*, struct Channel
*, long);
34 /* {{{ DECLARE_MODULE_AV1(...) */
47 /* {{{ static int _modinit() */
51 extban_table
['x'] = eb_extended
;
56 /* {{{ static void _moddeinit() */
60 extban_table
['x'] = NULL
;
64 /* {{{ static int eb_extended() */
65 static int eb_extended (const char *data
, struct Client
*client_p
,
66 struct Channel
*chptr
, long mode_type
)
72 return EXTBAN_INVALID
;
74 ircsnprintf(buf
, BUFSIZE
, "%s!%s@%s#%s", client_p
->name
, client_p
->username
,
75 client_p
->host
, client_p
->info
);
77 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;
78 if (ret
== EXTBAN_NOMATCH
&& IsDynSpoof(client_p
))
80 ircsnprintf(buf
, BUFSIZE
, "%s!%s@%s#%s", client_p
->name
,
81 client_p
->username
, client_p
->orighost
, client_p
->info
);
83 ret
= match(data
, buf
) ? EXTBAN_MATCH
: EXTBAN_NOMATCH
;
91 * vim: ts=8 sw=8 noet fdm=marker tw=80