[Bug Fix] Dialogue Window Name replace. (#1581)

{name} was being replaced with the string "$name" because Perl would parse it properly, but when used here it doesn't return the client's name.
This commit is contained in:
Kinglykrab 2021-10-03 13:06:31 -04:00 committed by GitHub
parent 5720a5020d
commit 3a76d9a28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ void DialogueWindow::Render(Client *c, std::string markdown)
find_replace(output, "{gray}", "<c \"#808080\">");
find_replace(output, "{tan}", "<c \"#daa520\">");
find_replace(output, "{bullet}", "");
find_replace(output, "{name}", "$name");
find_replace(output, "{name}", fmt::format("{}", c->GetCleanName()));
find_replace(output, "{linebreak}", "--------------------------------------------------------------------");
find_replace(output, "{rowpad}", R"(<tr><td>{tdpad}<"td><td>{tdpad}<"td><"tr>)");
find_replace(output, "{tdpad}", "----------------------");