diff options
| author | 2023-01-23 07:42:07 +0000 | |
|---|---|---|
| committer | 2023-01-23 13:07:53 +0000 | |
| commit | 5c4badf8ea3ba775854f0d26d3f2e0e119584faa (patch) | |
| tree | 05dd2c5c545f12f71866be6422146477ddd30e3f /src/modules/m_helpop.cpp | |
| parent | Vendor the fmtlib library. (diff) | |
Replace InspIRCd::Format with fmt::format.
Diffstat (limited to 'src/modules/m_helpop.cpp')
| -rw-r--r-- | src/modules/m_helpop.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 861347fa3..5fe3026ca 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -121,16 +121,16 @@ public: // Attempt to read the help key. const std::string key = tag->getString("key"); if (key.empty()) - throw ModuleException(this, InspIRCd::Format("<helpop:key> is empty at %s", tag->source.str().c_str())); + throw ModuleException(this, INSP_FORMAT("<helpop:key> is empty at {}", tag->source.str())); else if (irc::equals(key, "index")) - throw ModuleException(this, InspIRCd::Format("<helpop:key> is set to \"index\" which is reserved at %s", tag->source.str().c_str())); + throw ModuleException(this, INSP_FORMAT("<helpop:key> is set to \"index\" which is reserved at {}", tag->source.str())); else if (key.length() > longestkey) longestkey = key.length(); // Attempt to read the help value. std::string value; if (!tag->readString("value", value, true) || value.empty()) - throw ModuleException(this, InspIRCd::Format("<helpop:value> is empty at %s", tag->source.str().c_str())); + throw ModuleException(this, INSP_FORMAT("<helpop:value> is empty at {}", tag->source.str())); // Parse the help body. Empty lines are replaced with a single // space because some clients are unable to show blank lines. @@ -140,11 +140,11 @@ public: helpmsg.push_back(line.empty() ? " " : line); // Read the help title and store the topic. - const std::string title = tag->getString("title", InspIRCd::Format("*** Help for %s", key.c_str()), 1); + const std::string title = tag->getString("title", INSP_FORMAT("*** Help for {}", key), 1); if (!newhelp.emplace(key, HelpTopic(helpmsg, title)).second) { - throw ModuleException(this, InspIRCd::Format("<helpop> tag with duplicate key '%s' at %s", - key.c_str(), tag->source.str().c_str())); + throw ModuleException(this, INSP_FORMAT("<helpop> tag with duplicate key '{}' at {}", + key, tag->source.str())); } } |
