]> 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 7d66cb89514d6b975c9caf3a5360c2d969fc89eb..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
@@ -160,7 +160,7 @@ class ModuleCAP : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION);
+               return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
        }
 };