]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
fix some unitialised vectors and tidy up a bit.
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index 14468ab36392973f8120d904c747ca9db796208b..36880d5edf2e30b164e68af56af2979056d5e8cd 100644 (file)
@@ -27,7 +27,7 @@ class CommandCheck : public Command
                syntax = "<nickname>|<ip>|<hostmask>|<channel>";
        }
 
-       CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
                User *targuser;
                Channel *targchan;
@@ -131,13 +131,13 @@ class CommandCheck : public Command
                        /* hostname or other */
                        for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); a++)
                        {
-                               if (match(a->second->host, parameters[0]) || match(a->second->dhost, parameters[0]))
+                               if (match(a->second->host, parameters[0].c_str()) || match(a->second->dhost, parameters[0].c_str()))
                                {
                                        /* host or vhost matches mask */
                                        user->WriteServ(checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
                                }
                                /* IP address */
-                               else if (match(a->second->GetIPString(), parameters[0], true))
+                               else if (match(a->second->GetIPString(), parameters[0].c_str(), true))
                                {
                                        /* same IP. */
                                        user->WriteServ(checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
@@ -173,7 +173,7 @@ class ModuleCheck : 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);
        }