diff options
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/cs_mode.cpp | 17 | ||||
-rw-r--r-- | modules/commands/ns_set.cpp | 9 |
2 files changed, 18 insertions, 8 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 03a3d2b60..77312b0c1 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -296,7 +296,8 @@ class CommandCSMode : public Command Anope::string pos = "+", neg = "-", pos_params, neg_params; - int adding = -1; + int adding = 1; + bool needreply = true; for (size_t i = 0; i < modes.length(); ++i) { switch (modes[i]) @@ -308,8 +309,7 @@ class CommandCSMode : public Command adding = 0; break; default: - if (adding == -1) - break; + needreply = false; ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]); if (!cm) { @@ -358,6 +358,8 @@ class CommandCSMode : public Command source.Reply(_("%s locked on %s."), reply.c_str(), ci->name.c_str()); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to lock " << reply; } + else if (needreply) + source.Reply(_("Nothing to do.")); if (ci->c) ci->c->CheckModes(); @@ -369,7 +371,8 @@ class CommandCSMode : public Command sep.GetToken(modes); - int adding = -1; + int adding = 1; + bool needreply = true; for (size_t i = 0; i < modes.length(); ++i) { switch (modes[i]) @@ -381,8 +384,7 @@ class CommandCSMode : public Command adding = 0; break; default: - if (adding == -1) - break; + needreply = false; ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]); if (!cm) { @@ -412,6 +414,9 @@ class CommandCSMode : public Command } } } + + if (needreply) + source.Reply(_("Nothing to do.")); } else if (subcommand.equals_ci("LIST")) { diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index a1e37e15e..7a69e33e0 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -924,11 +924,16 @@ class CommandNSSetMessage : public Command bool OnHelp(CommandSource &source, const Anope::string &) anope_override { + Anope::string cmd = source.command; + size_t i = cmd.find_last_of(' '); + if (i != Anope::string::npos) + cmd = cmd.substr(i + 1); + this->SendSyntax(source); source.Reply(" "); source.Reply(_("Allows you to choose the way Services are communicating with\n" - "you. With \002MSG\002 set, Services will use messages, else they'll\n" - "use notices.")); + "you. With \002%s\002 set, Services will use messages, else they'll\n" + "use notices."), cmd.upper().c_str()); return true; } |