aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_help.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-18 13:12:28 +0000
committerGravatar Sadie Powell2025-03-18 13:12:28 +0000
commit8adda0dca4cb94be6a071e67b3e3c89a22375aca (patch)
treee68839d6da2df39b3ba43a8665e44a9a98c6c16c /src/modules/m_help.cpp
parentSkip lines which are empty in mkheaders. (diff)
Add a formatting overload of the ModuleException constructor.
Diffstat (limited to 'src/modules/m_help.cpp')
-rw-r--r--src/modules/m_help.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_help.cpp b/src/modules/m_help.cpp
index dda487c5c..eebc093d6 100644
--- a/src/modules/m_help.cpp
+++ b/src/modules/m_help.cpp
@@ -115,16 +115,16 @@ public:
// Attempt to read the help key.
const std::string key = tag->getString("key");
if (key.empty())
- throw ModuleException(this, INSP_FORMAT("<{}:key> is empty at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, "<{}:key> is empty at {}", tag->name, tag->source.str());
else if (irc::equals(key, "index"))
- throw ModuleException(this, INSP_FORMAT("<{}:key> is set to \"index\" which is reserved at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, "<{}:key> is set to \"index\" which is reserved at {}", tag->name, 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, INSP_FORMAT("<{}:value> is empty at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, "<{}:value> is empty at {}", tag->name, tag->source.str());
// Parse the help body. Empty lines are replaced with a single
// space because some clients are unable to show blank lines.
@@ -137,8 +137,8 @@ public:
const std::string title = tag->getString("title", INSP_FORMAT("*** Help for {}", key), 1);
if (!newhelp.emplace(key, HelpTopic(helpmsg, title)).second)
{
- throw ModuleException(this, INSP_FORMAT("<{}> tag with duplicate key '{}' at {}",
- tag->name, key, tag->source.str()));
+ throw ModuleException(this, "<{}> tag with duplicate key '{}' at {}",
+ tag->name, key, tag->source.str());
}
}