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/cs_flags.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/cs_flags.cpp')
-rw-r--r-- | modules/commands/cs_flags.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index 7e17a1b47..ac03febb7 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -396,10 +396,18 @@ class CommandCSFlags : public Command has_access = true; if (!has_access) + { source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), is_list ? "ACCESS_LIST" : "ACCESS_CHANGE", ci->name); - else if (Anope::ReadOnly && !is_list) + return; + } + + if (Anope::ReadOnly && !is_list) + { source.Reply(_("Sorry, channel access list modification is temporarily disabled.")); - else if (cmd.equals_ci("MODIFY")) + return; + } + + if (cmd.equals_ci("MODIFY")) this->DoModify(source, ci, params); else if (is_list) this->DoList(source, ci, params); |