summaryrefslogtreecommitdiff
path: root/modules/commands/cs_drop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_drop.cpp')
-rw-r--r--modules/commands/cs_drop.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp
index adbe1f2ca..e0b40a9d5 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/commands/cs_drop.cpp
@@ -14,10 +14,10 @@
class CommandCSDrop : public Command
{
public:
- CommandCSDrop(Module *creator) : Command(creator, "chanserv/drop", 1, 1)
+ CommandCSDrop(Module *creator) : Command(creator, "chanserv/drop", 1, 2)
{
this->SetDesc(_("Cancel the registration of a channel"));
- this->SetSyntax(_("\037channel\037"));
+ this->SetSyntax(_("\037channel\037 \037channel\037"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
@@ -37,6 +37,12 @@ class CommandCSDrop : public Command
return;
}
+ if (params.size() < 2 || !chan.equals_ci(params[1]))
+ {
+ source.Reply(_("You must enter the channel name twice as a confirmation that you wish to drop \2%s\2."), chan.c_str());
+ return;
+ }
+
if ((ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")) && !source.HasCommand("chanserv/drop"))
{
source.Reply(ACCESS_DENIED);