]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-cap.c
Update #include's: remove unused and add missing ones
[ngircd-alex.git] / src / ngircd / irc-cap.c
index 52abcec9559679317f728098d16c52a8d2cd5c2f..23ad5f69079632f93c6c98c575c68b175492ceea 100644 (file)
  * Handler for IRC capability ("CAP") commands
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <string.h>
+#include <strings.h>
 
-#include "defines.h"
 #include "conn.h"
 #include "channel.h"
 #include "client-cap.h"
@@ -30,9 +29,6 @@
 #include "messages.h"
 #include "parse.h"
 
-#include "exp.h"
-#include "irc-cap.h"
-
 /* Local functions */
 
 /**
@@ -249,11 +245,6 @@ IRC_CAP(CLIENT *Client, REQUEST *Req)
        assert(Client != NULL);
        assert(Req != NULL);
 
-       /* Bad number of prameters? */
-       if (Req->argc < 1 || Req->argc > 2)
-               return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
-                                         Client_ID(Client), Req->command);
-
        LogDebug("Got \"%s %s\" command from \"%s\" ...",
                 Req->command, Req->argv[0], Client_ID(Client));
 
@@ -276,7 +267,7 @@ IRC_CAP(CLIENT *Client, REQUEST *Req)
                        return Handle_CAP_ACK(Client, Req->argv[1]);
        }
 
-       return IRC_WriteStrClient(Client, ERR_INVALIDCAP_MSG,
+       return IRC_WriteErrClient(Client, ERR_INVALIDCAP_MSG,
                                  Client_ID(Client), Req->argv[0]);
 }