Module: ngircd.git Branch: master Commit: 245782897b4a8ca092a87bf6d3961cbda1dea962 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=24578...
Author: Alexander Barton alex@barton.de Date: Fri Apr 27 23:56:56 2012 +0200
New function Client_CapSet() in addition to Client_Cap{Add|Del}
---
src/ngircd/client-cap.c | 11 +++++++++++ src/ngircd/client-cap.h | 1 + 2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/client-cap.c b/src/ngircd/client-cap.c index edaf260..b0da807 100644 --- a/src/ngircd/client-cap.c +++ b/src/ngircd/client-cap.c @@ -38,6 +38,17 @@ Client_Cap(CLIENT *Client) }
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) { assert(Client != NULL); diff --git a/src/ngircd/client-cap.h b/src/ngircd/client-cap.h index faec1c2..e477dc0 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));
ngircd-commits@lists.barton.de