diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-21 23:14:28 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-21 23:14:28 -0400 |
commit | 1e20877e2f529b61b205a0b1202c32962ee47938 (patch) | |
tree | 85e4655edf6071d41391362b5d9fcdd0589d63c8 /src/core/cs_saset.cpp | |
parent | fb16ce72a0b5a3ce336e003327c8d1740f4fdb98 (diff) |
The next of a few "CBX OCDing over code style" commits, focusing on src/core/bs_* and src/core/cs_*.
Diffstat (limited to 'src/core/cs_saset.cpp')
-rw-r--r-- | src/core/cs_saset.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/core/cs_saset.cpp b/src/core/cs_saset.cpp index 29f7f7264..02a44e974 100644 --- a/src/core/cs_saset.cpp +++ b/src/core/cs_saset.cpp @@ -7,10 +7,8 @@ * * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. - * - * $Id$ - * */ + /*************************************************************************/ #include "module.h" @@ -26,10 +24,8 @@ class CommandCSSASet : public Command ~CommandCSSASet() { - for (std::map<ci::string, Command *>::const_iterator it = this->subcommands.begin(); it != this->subcommands.end(); ++it) - { + for (std::map<ci::string, Command *>::const_iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it) delete it->second; - } this->subcommands.clear(); } @@ -46,7 +42,7 @@ class CommandCSSASet : public Command if (c) { ci::string cmdparams = cs_findchan(params[0])->name.c_str(); - for (std::vector<ci::string>::const_iterator it = params.begin() + 2; it != params.end(); ++it) + for (std::vector<ci::string>::const_iterator it = params.begin() + 2, it_end = params.end(); it != it_end; ++it) cmdparams += " " + *it; mod_run_cmd(ChanServ, u, c, params[1], cmdparams); } @@ -64,7 +60,7 @@ class CommandCSSASet : public Command if (subcommand.empty()) { notice_help(Config.s_ChanServ, u, CHAN_HELP_SASET_HEAD); - for (std::map<ci::string, Command *>::iterator it = this->subcommands.begin(); it != this->subcommands.end(); ++it) + for (std::map<ci::string, Command *>::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it) it->second->OnServHelp(u); notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TAIL); return true; @@ -74,9 +70,7 @@ class CommandCSSASet : public Command Command *c = this->FindCommand(subcommand); if (c) - { return c->OnHelp(u, subcommand); - } } return false; @@ -107,9 +101,7 @@ class CommandCSSASet : public Command std::map<ci::string, Command *>::const_iterator it = this->subcommands.find(subcommand); if (it != this->subcommands.end()) - { return it->second; - } return NULL; } @@ -121,7 +113,7 @@ class CSSASet : public Module CSSASet(const std::string &modname, const std::string &creator) : Module(modname, creator) { this->SetAuthor("Anope"); - this->SetVersion("$Id$"); + this->SetVersion(VERSION_STRING); this->SetType(CORE); this->AddCommand(ChanServ, new CommandCSSASet("SASET")); |