diff options
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r-- | modules/commands/cs_clone.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index 84c7d91cb..c287f6a0b 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -99,11 +99,9 @@ class CommandCSClone : public Command 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) + for (const auto &[priv, level] : ci->GetLevelEntries()) { - target_ci->SetLevel(it->first, it->second); + target_ci->SetLevel(priv, level); } 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()); @@ -199,8 +197,8 @@ public: const Anope::string settings[] = { "NOAUTOOP", "CS_KEEP_MODES", "PEACE", "PERSIST", "RESTRICTED", "CS_SECURE", "SECUREFOUNDER", "SECUREOPS", "SIGNKICK", "SIGNKICK_LEVEL", "CS_NO_EXPIRE" }; - for (unsigned int i = 0; i < sizeof(settings) / sizeof(Anope::string); ++i) - CopySetting(ci, target_ci, settings[i]); + for (const auto &setting : settings) + CopySetting(ci, target_ci, setting); CopyAccess(source, ci, target_ci); CopyAkick(source, ci, target_ci); |