diff options
-rw-r--r-- | data/nickserv.example.conf | 8 | ||||
-rw-r--r-- | modules/commands/cs_mode.cpp | 17 | ||||
-rw-r--r-- | modules/commands/ns_set.cpp | 9 |
3 files changed, 22 insertions, 12 deletions
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf index 5685d184b..0c7fd49c6 100644 --- a/data/nickserv.example.conf +++ b/data/nickserv.example.conf @@ -361,13 +361,13 @@ module maxaliases = 16 /* - * If set, the NickServ GROUP command won't allow any group change. This is recommended for - * better performance and to protect against nick stealing, however users will have less - * flexibility. + * If set, the NickServ GROUP command won't allow any group changes. This is recommended to + * prevent users from accidentally dropping their nicks, as it forces users to explicitly + * drop their nicks before adding it to another group. * * This directive is optional, but recommended. */ - #nogroupchange = yes + nogroupchange = yes } command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; } command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; } 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; } |