ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/extban_account.c
Revision: 9250
Committed: Sat Feb 1 13:36:10 2020 UTC (5 years, 6 months ago) by michael
Content type: text/x-csrc
File size: 1654 byte(s)
Log Message:
- Rename most occurrences of 'client_p' to 'client'

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 2015-2016 plexus development team
5 * Copyright (c) 2019-2020 ircd-hybrid development team
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
20 * USA
21 */
22
23 /*! \file extban_account.c
24 * \brief Implements services account based extended channel bans.
25 * \version $Id$
26 */
27
28 #include "stdinc.h"
29 #include "list.h"
30 #include "irc_string.h"
31 #include "channel.h"
32 #include "channel_mode.h"
33 #include "client.h"
34 #include "extban.h"
35
36
37 static enum extban_match
38 extban_account_matches(struct Client *client, struct Channel *channel, struct Ban *ban)
39 {
40 assert(client->account[0]);
41
42 if (strcmp(client->account, "*"))
43 if (match(ban->host, client->account) == 0)
44 return EXTBAN_MATCH;
45
46 return EXTBAN_NO_MATCH;
47 }
48
49 struct Extban extban_account =
50 {
51 .character = 'a',
52 .type = EXTBAN_MATCHING,
53 .types = CHFL_BAN | CHFL_EXCEPTION | CHFL_INVEX,
54 .matches = extban_account_matches
55 };

Properties

Name Value
svn:eol-style native
svn:keywords Id