diff --git a/src/ngircd/client-cap.c b/src/ngircd/client-cap.c index edaf2603..b0da8073 100644 --- a/src/ngircd/client-cap.c +++ b/src/ngircd/client-cap.c @@ -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) { diff --git a/src/ngircd/client-cap.h b/src/ngircd/client-cap.h index faec1c20..e477dc00 100644 --- a/src/ngircd/client-cap.h +++ b/src/ngircd/client-cap.h @@ -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));