]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_auditorium.cpp
Fix warning
[user/henk/code/inspircd.git] / src / modules / m_auditorium.cpp
index dcca4cc3d21f313277cb4cd713663fd2c2767765..75f953f437f19dd5553701e88c00524320dba740 100644 (file)
@@ -83,7 +83,7 @@ class ModuleAuditorium : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
         virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick)
@@ -161,7 +161,6 @@ class ModuleAuditorium : public Module
        {
                Command* parthandler = ServerInstance->Parser->GetHandler("PART");
                std::vector<std::string> to_leave;
-               const char* parameters[2];
                if (parthandler)
                {
                        for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
@@ -172,9 +171,10 @@ class ModuleAuditorium : public Module
                        /* We cant do this neatly in one loop, as we are modifying the map we are iterating */
                        for (std::vector<std::string>::iterator n = to_leave.begin(); n != to_leave.end(); n++)
                        {
-                               parameters[0] = n->c_str();
+                               std::vector<std::string> parameters;
+                               parameters.push_back(*n);
                                /* This triggers our OnUserPart, above, making the PART silent */
-                               parthandler->Handle(parameters, 1, user);
+                               parthandler->Handle(parameters, user);
                        }
                }
        }