summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"))