2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
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.
9 * Please read the file COPYING, README and AUTHORS for more information.
12 #define __client_cap_c__
18 * Functions to deal with IRC Capabilities
27 Client_Cap(CLIENT *Client)
29 assert (Client != NULL);
31 return Client->capabilities;
35 Client_CapSet(CLIENT *Client, int Cap)
37 assert(Client != NULL);
40 Client->capabilities = Cap;
41 LogDebug("Set new capability of \"%s\" to %d.",
42 Client_ID(Client), Client->capabilities);
46 Client_CapAdd(CLIENT *Client, int Cap)
48 assert(Client != NULL);
51 Client->capabilities |= Cap;
52 LogDebug("Add capability %d, new capability of \"%s\" is %d.",
53 Cap, Client_ID(Client), Client->capabilities);
57 Client_CapDel(CLIENT *Client, int Cap)
59 assert(Client != NULL);
62 Client->capabilities &= ~Cap;
63 LogDebug("Delete capability %d, new capability of \"%s\" is %d.",
64 Cap, Client_ID(Client), Client->capabilities);