diff options
author | Adam <Adam@anope.org> | 2015-10-27 18:57:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-10-27 18:58:48 -0400 |
commit | 64dac60071fab652745a6e7a06cf6b7bdbbd3625 (patch) | |
tree | f8f30161150451672b381f6370a8fdcab654bbb8 /modules/commands/cs_clone.cpp | |
parent | 162fdbe5815bbdf187f549fefac94ff476d72e62 (diff) | |
parent | 830361e97d03c74e54cb1cf1bbf329dffdeb66f7 (diff) |
Merge branch '2.0' into 2.1
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r-- | modules/commands/cs_clone.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index 69dc70bea..256446bd1 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -15,6 +15,20 @@ class CommandCSClone : public Command { +#if 0 + void CopyLevels(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci) + { + const Anope::map<int16_t> &cilevels = ci->GetLevelEntries(); + + for (Anope::map<int16_t>::const_iterator it = cilevels.begin(); it != cilevels.end(); ++it) + { + target_ci->SetLevel(it->first, it->second); + } + + source.Reply(_("All level entries from \002%s\002 have been cloned into \002%s\002."), ci->name.c_str(), target_ci->name.c_str()); + } +#endif + public: CommandCSClone(Module *creator) : Command(creator, "chanserv/clone", 2, 3) { @@ -73,7 +87,7 @@ public: if (what.empty()) { - delete target_ci; + target_ci->Delete(); target_ci = ChanServ::channel.Create(); target_ci->SetName(target); ChanServ::registered_channel_map& map = ChanServ::service->GetChannels(); |