]> jfr.im git - irc/quakenet/snircd.git/blame - include/capab.h
Import of u2_10_12_08
[irc/quakenet/snircd.git] / include / capab.h
CommitLineData
189935b1 1#ifndef INCLUDED_capab_h
2#define INCLUDED_capab_h
3/*
4 * IRC - Internet Relay Chat, include/capab.h
5 * Copyright (C) 2004 Kevin L. Mitchell <klmitch@mit.edu>
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, or (at your option)
10 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21/** @file
22 * @brief Interface and public definitions for capabilities extension
23 * @version $Id: capab.h,v 1.2 2005/04/05 01:46:05 entrope Exp $
24 */
25
26#ifndef INCLUDED_client_h
27#include "client.h"
28#endif
29
30#define CAPFL_HIDDEN 0x0001 /**< Do not advertize this capability */
31#define CAPFL_PROHIBIT 0x0002 /**< Client may not set this capability */
32#define CAPFL_PROTO 0x0004 /**< Cap must be acknowledged by client */
33#define CAPFL_STICKY 0x0008 /**< Cap may not be cleared once set */
34
35#define CAPLIST \
36 _CAP(USERPFX, 0, "undernet.org/userpfx")
37
38/** Client capabilities */
39enum Capab {
40#define _CAP(cap, flags, name) CAP_ ## cap
41 CAPLIST,
42#undef _CAP
43 _CAP_LAST_CAP
44};
45
46DECLARE_FLAGSET(CapSet, _CAP_LAST_CAP);
47
48#define CapHas(cs, cap) FlagHas(cs, cap)
49#define CapSet(cs, cap) FlagSet(cs, cap)
50#define CapClr(cs, cap) FlagClr(cs, cap)
51
52#endif /* INCLUDED_capab_h */