1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 00:06:40 +02:00

Replace usestrictprivmsg with something actually useful.

Every IRC server we support (other than Bahamut which is probably
on the chopping bock) uses UIDs so this setting does nothing.

Instead, allow configuring a server-side alias for each service
and use that when servicealias is enabled.
This commit is contained in:
Sadie Powell
2024-10-22 16:16:32 +01:00
parent 8b02613549
commit f1751dcb21
33 changed files with 242 additions and 155 deletions
+5 -5
View File
@@ -199,7 +199,7 @@ void Command::OnSyntaxError(CommandSource &source, const Anope::string &subcomma
this->SendSyntax(source);
bool has_help = source.service->commands.find("HELP") != source.service->commands.end();
if (has_help)
source.Reply(MORE_INFO, Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), source.command.c_str());
source.Reply(MORE_INFO, source.service->GetQueryCommand().c_str(), source.command.c_str());
}
namespace
@@ -226,13 +226,13 @@ namespace
bool has_help = source.service->commands.find("HELP") != source.service->commands.end();
if (has_help && similar.empty())
{
source.Reply(_("Unknown command \002%s\002. \"%s%s HELP\" for help."), message.c_str(),
Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
source.Reply(_("Unknown command \002%s\002. \"%s HELP\" for help."), message.c_str(),
source.service->GetQueryCommand().c_str());
}
else if (has_help)
{
source.Reply(_("Unknown command \002%s\002. Did you mean \002%s\002? \"%s%s HELP\" for help."),
message.c_str(), similar.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
source.Reply(_("Unknown command \002%s\002. Did you mean \002%s\002? \"%s HELP\" for help."),
message.c_str(), similar.c_str(), source.service->GetQueryCommand().c_str());
}
else if (similar.empty())
{