diff options
| author | Alexander Barton <alex@barton.de> | 2012-04-27 23:56:56 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-04-27 23:56:56 +0200 |
| commit | 245782897b4a8ca092a87bf6d3961cbda1dea962 (patch) | |
| tree | e35a48edbfe112aa9917e11ee643fd9a8affc31c | |
| parent | 2327b17656b329d6210628f24c77f51533c05620 (diff) | |
| download | ngircd-245782897b4a8ca092a87bf6d3961cbda1dea962.tar.gz ngircd-245782897b4a8ca092a87bf6d3961cbda1dea962.zip | |
New function Client_CapSet() in addition to Client_Cap{Add|Del}
| -rw-r--r-- | src/ngircd/client-cap.c | 11 | ||||
| -rw-r--r-- | 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 edaf2603..b0da8073 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 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)); |