New function Client_CapSet() in addition to Client_Cap{Add|Del}

This commit is contained in:
Alexander Barton 2012-04-27 23:56:56 +02:00
parent 2327b17656
commit 245782897b
2 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,17 @@ Client_Cap(CLIENT *Client)
return Client->capabilities;
}
GLOBAL void
Client_CapSet(CLIENT *Client, int Cap)
{
assert(Client != NULL);
assert(Cap >= 0);
Client->capabilities = Cap;
LogDebug("Set new capability of \"%s\" to %d.",
Client_ID(Client), Client->capabilities);
}
GLOBAL void
Client_CapAdd(CLIENT *Client, int Cap)
{

View File

@ -22,6 +22,7 @@
GLOBAL int Client_Cap PARAMS((CLIENT *Client));
GLOBAL void Client_CapSet PARAMS((CLIENT *Client, int Cap));
GLOBAL void Client_CapAdd PARAMS((CLIENT *Client, int Cap));
GLOBAL void Client_CapDel PARAMS((CLIENT *Client, int Cap));