summaryrefslogtreecommitdiff
path: root/modules/commands/cs_clone.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-01-26 20:06:36 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-01-26 20:06:36 +0100
commit53a78c2688c9b4feaa17f35305647afd334c08b8 (patch)
tree166411590ed3c46d31887cf64f8b50ac0f9cdebf /modules/commands/cs_clone.cpp
parente61a283c02d6484b5e5ec36298085876e6f8c7f0 (diff)
Fix cs_clone allowing users to clone a channel to itself
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r--modules/commands/cs_clone.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp
index ce097699c..e93029466 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/commands/cs_clone.cpp
@@ -49,6 +49,13 @@ public:
source.Reply(CHAN_X_NOT_REGISTERED, target.c_str());
return;
}
+
+ if (ci == target_ci)
+ {
+ source.Reply(_("Cannot clone channel \002%s\002 to itself!"), target.c_str());
+ return;
+ }
+
if (!source.IsFounder(ci) || !source.IsFounder(target_ci))
{
if (!source.HasPriv("chanserv/administration"))