]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_auditorium.cpp
Fix these too
[user/henk/code/inspircd.git] / src / modules / m_auditorium.cpp
index 0ed4566e84929b6ce7416ca266a144b02d41d138..0a1555b29caa702293e4d81b3e754b6edf58a042 100644 (file)
@@ -26,7 +26,7 @@ class AuditoriumMode : public ModeHandler
                {
                        if (IS_LOCAL(source) && (channel->GetStatus(source) < STATUS_OP))
                        {
-                               source->WriteNumeric(482, "%s %s :Only channel operators may %sset channel mode +u", source->nick, channel->name, adding ? "" : "un");
+                               source->WriteNumeric(482, "%s %s :Only channel operators may %sset channel mode +u", source->nick.c_str(), channel->name, adding ? "" : "un");
                                return MODEACTION_DENY;
                        }
                        else
@@ -149,11 +149,11 @@ class ModuleAuditorium : public Module
                {
                        silent = true;
                        /* Send silenced event only to the user being kicked and the user doing the kick */
-                       source->WriteFrom(source, "KICK %s %s %s", chan->name, user->nick, reason.c_str());
+                       source->WriteFrom(source, "KICK %s %s %s", chan->name, user->nick.c_str(), reason.c_str());
                        if (ShowOps)
-                               chan->WriteAllExcept(source, false, chan->GetStatus(source) >= STATUS_OP ? 0 : '@', except_list, "KICK %s %s %s", chan->name, user->nick, reason.c_str());
+                               chan->WriteAllExcept(source, false, chan->GetStatus(source) >= STATUS_OP ? 0 : '@', except_list, "KICK %s %s %s", chan->name, user->nick.c_str(), reason.c_str());
                        else
-                               user->WriteFrom(source, "KICK %s %s %s", chan->name, user->nick, reason.c_str());
+                               user->WriteFrom(source, "KICK %s %s %s", chan->name, user->nick.c_str(), reason.c_str());
                }
        }
 
@@ -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);
                        }
                }
        }