]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_clearchan.cpp
Use CommandBase::Params instead of std::vector<std::string>.
[user/henk/code/inspircd.git] / src / modules / m_clearchan.cpp
index 5fcec36f1777d9567a7dc8d9b9d2a41fe97d665d..016d28737ff88fcb6e4ce2a35cfed6ebe4732bbd 100644 (file)
@@ -35,7 +35,7 @@ class CommandClearChan : public Command
                force_manual_route = true;
        }
 
-       CmdResult Handle(const std::vector<std::string>& parameters, User* user)
+       CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
        {
                Channel* chan = activechan = ServerInstance->FindChan(parameters[0]);
                if (!chan)
@@ -79,7 +79,7 @@ class CommandClearChan : public Command
                        // The idea is that by the time our QUITs reach the next hop, it has already removed all their
                        // clients from the channel, meaning victims on other servers won't see the victims on this
                        // server quitting.
-                       std::vector<std::string> eparams;
+                       CommandBase::Params eparams;
                        eparams.push_back(chan->name);
                        eparams.push_back(method);
                        eparams.push_back(":");
@@ -116,10 +116,10 @@ class CommandClearChan : public Command
                                XLine* xline;
                                try
                                {
-                                       mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->host);
+                                       mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->GetRealHost());
                                        xline = xlf->Generate(ServerInstance->Time(), 60*60, user->nick, reason, mask);
                                }
-                               catch (ModuleException& ex)
+                               catch (ModuleException&)
                                {
                                        // Nothing, move on to the next user
                                        continue;
@@ -150,7 +150,7 @@ class ModuleClearChan : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                // Only attached while we are working; don't react to events otherwise
                ServerInstance->Modules->DetachAll(this);