diff options
| author | Adam <Adam@anope.org> | 2014-06-25 11:02:19 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-06-25 11:02:19 -0400 |
| commit | ee3289029d61da12013e0f5a3e4faf2d07543a0e (patch) | |
| tree | df7391c321a913fc56db2d075292c0a6ddb0536d /modules/commands/bs_badwords.cpp | |
| parent | fd9bb0ea7e3c8a39f1632c2ebbdc25d0fac192a0 (diff) | |
Remove the rest of the 1.8 logic "let's write all of the command handler with no return statement!"
Fix if (something) else if (!something) tests
Remove returns at the bottom of void functions
Diffstat (limited to 'modules/commands/bs_badwords.cpp')
| -rw-r--r-- | modules/commands/bs_badwords.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index 5e9dd363a..a29209e31 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -245,19 +245,20 @@ class CommandBSBadwords : public Command } if (list.IsEmpty()) - source.Reply(_("No matching entries on the bad word list of \002{0}\002."), ci->name); - else { - std::vector<Anope::string> replies; - list.Process(replies); + source.Reply(_("No matching entries on the bad word list of \002{0}\002."), ci->name); + return; + } - source.Reply(_("Bad words list for \002{0}\002:"), ci->name); + std::vector<Anope::string> replies; + list.Process(replies); - for (unsigned i = 0; i < replies.size(); ++i) - source.Reply(replies[i]); + source.Reply(_("Bad words list for \002{0}\002:"), ci->name); - source.Reply(_("End of bad words list.")); - } + for (unsigned i = 0; i < replies.size(); ++i) + source.Reply(replies[i]); + + source.Reply(_("End of bad words list.")); } void DoAdd(CommandSource &source, ChanServ::Channel *ci, const Anope::string &word) |
