X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_clearchan.cpp;h=592559afc5470fbb320cc29276f27399f87051fe;hb=HEAD;hp=1b4b8724ae15319127985def89818bd8db600d30;hpb=bb4aa10ed82612624da45d0c9592ddf7f2f51ab5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index 1b4b8724a..592559afc 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -1,7 +1,9 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2014 Attila Molnar + * Copyright (C) 2019 Robby + * Copyright (C) 2017-2018 Sadie Powell + * Copyright (C) 2014, 2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -28,14 +30,14 @@ class CommandClearChan : public Command CommandClearChan(Module* Creator) : Command(Creator, "CLEARCHAN", 1, 3) { - syntax = " [] []"; + syntax = " [KILL|KICK|G|Z] [:]"; flags_needed = 'o'; // Stop the linking mod from forwarding ENCAP'd CLEARCHAN commands, see below why force_manual_route = true; } - CmdResult Handle(const std::vector& parameters, User* user) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { Channel* chan = activechan = ServerInstance->FindChan(parameters[0]); if (!chan) @@ -79,7 +81,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 eparams; + CommandBase::Params eparams; eparams.push_back(chan->name); eparams.push_back(method); eparams.push_back(":"); @@ -116,7 +118,7 @@ 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&) @@ -211,7 +213,7 @@ class ModuleClearChan : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Adds /CLEARCHAN that allows opers to masskick, masskill or mass-G/ZLine users on a channel", VF_VENDOR|VF_OPTCOMMON); + return Version("Adds the /CLEARCHAN command which allows server operators to mass-punish the members of a channel.", VF_VENDOR|VF_OPTCOMMON); } };