From 53a78c2688c9b4feaa17f35305647afd334c08b8 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 26 Jan 2014 20:06:36 +0100 Subject: Fix cs_clone allowing users to clone a channel to itself --- modules/commands/cs_clone.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/commands/cs_clone.cpp') 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")) -- cgit