X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=include%2Fcapab.h;fp=include%2Fcapab.h;h=d2c07debdd8760903c049605700b75ae7440df07;hp=0000000000000000000000000000000000000000;hb=0400a5a6479398d82526785c18c0df8bc8b92dce;hpb=d17e10da972ce5776c60b4c317267c6abe0e1ead diff --git a/include/capab.h b/include/capab.h new file mode 100644 index 0000000..d2c07de --- /dev/null +++ b/include/capab.h @@ -0,0 +1,52 @@ +#ifndef INCLUDED_capab_h +#define INCLUDED_capab_h +/* + * IRC - Internet Relay Chat, include/capab.h + * Copyright (C) 2004 Kevin L. Mitchell + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/** @file + * @brief Interface and public definitions for capabilities extension + * @version $Id$ + */ + +#ifndef INCLUDED_client_h +#include "client.h" +#endif + +#define CAPFL_HIDDEN 0x0001 /**< Do not advertize this capability */ +#define CAPFL_PROHIBIT 0x0002 /**< Client may not set this capability */ +#define CAPFL_PROTO 0x0004 /**< Cap must be acknowledged by client */ +#define CAPFL_STICKY 0x0008 /**< Cap may not be cleared once set */ + +#define CAPLIST \ + _CAP(USERPFX, 0, "undernet.org/userpfx") + +/** Client capabilities */ +enum Capab { +#define _CAP(cap, flags, name) CAP_ ## cap + CAPLIST, +#undef _CAP + _CAP_LAST_CAP +}; + +DECLARE_FLAGSET(CapSet, _CAP_LAST_CAP); + +#define CapHas(cs, cap) FlagHas(cs, cap) +#define CapSet(cs, cap) FlagSet(cs, cap) +#define CapClr(cs, cap) FlagClr(cs, cap) + +#endif /* INCLUDED_capab_h */