]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cap.cpp
Fixes to make this module scale much better. Dont connect on each query, keep open...
[user/henk/code/inspircd.git] / src / modules / m_cap.cpp
index 63d1d685f841dae9fc329504b5d91854f85fd707..986e40713c074b640e2e6cf55d5b6a2a34b24f62 100644 (file)
@@ -41,9 +41,9 @@ class CommandCAP : public Command
                this->source = "m_cap.so";
        }
 
-       CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
-               irc::string subcommand = parameters[0];
+               irc::string subcommand = parameters[0].c_str();
 
                if (subcommand == "REQ")
                {
@@ -53,7 +53,7 @@ class CommandCAP : public Command
                        Data.user = user;
                        Data.creator = this->Creator;
 
-                       if (pcnt < 2)
+                       if (parameters.size() < 2)
                                return CMD_FAILURE;
 
                        // tokenize the input into a nice list of requested caps