1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 08:36:37 +02:00

Fix erroneously repeating the command name in the example wrapper.

This commit is contained in:
Sadie Powell
2026-03-01 02:55:44 +00:00
parent 99f7ea8307
commit dde9113418
+6 -6
View File
@@ -340,20 +340,20 @@ void ExampleWrapper::SendTo(CommandSource &source)
header = false;
}
const auto *trans_command = Language::Translate(source.nc, source.command.c_str());
const auto *trans_example = Language::Translate(source.nc, entry.example.c_str());
const auto *trans_description = Language::Translate(source.nc, entry.description.c_str());
if (flexible)
{
source.Reply("\002%s%s%s\002: %s", source.command.c_str(), *trans_command ? " " : "",
trans_command, trans_description);
source.Reply("\002%s%s%s\002: %s", source.command.c_str(), *trans_example ? " " : "",
trans_example, trans_description);
}
else
{
source.Reply(" ");
const auto full_command = Anope::Format("%s%s%s", source.command.c_str(),
*trans_command ? " " : "", trans_command);
const auto full_example = Anope::Format("%s%s%s", source.command.c_str(),
*trans_example ? " " : "", trans_example);
LineWrapper elw(full_command, max_length - 2);
LineWrapper elw(full_example, max_length - 2);
for (Anope::string line; elw.GetLine(line); )
source.Reply("%s \002%s\002", monospace, line.c_str());