]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client-cap.c
Update copyright notices of recently changed files
[ngircd-alex.git] / src / ngircd / client-cap.c
index edaf2603bb79005a9b517a6d809702578fa50991..e6a4eb226476cc429eaef44bb038be3d0812563c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Functions to deal with IRC Capabilities
  */
 
-#include "imp.h"
 #include <assert.h>
 
-#include "defines.h"
 #include "conn.h"
-#include "client.h"
 #include "log.h"
 
-#include "exp.h"
-#include "client-cap.h"
-
 GLOBAL int
 Client_Cap(CLIENT *Client)
 {
@@ -37,6 +31,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)
 {