aboutsummaryrefslogtreecommitdiff
path: root/src/mode.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/mode.cpp
parentSkip lines which are empty in mkheaders. (diff)
Add a formatting overload of the ModuleException constructor.
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 48d2663f6..125506ffc 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -563,7 +563,7 @@ ModeHandler::Id ModeParser::AllocateModeId(ModeHandler* mh)
void ModeParser::AddMode(ModeHandler* mh)
{
if (!ModeParser::IsModeChar(mh->GetModeChar()))
- throw ModuleException(mh->creator, INSP_FORMAT("Mode letter for {} is invalid: {}", mh->name, mh->GetModeChar()));
+ throw ModuleException(mh->creator, "Mode letter for {} is invalid: {}", mh->name, mh->GetModeChar());
/* A mode prefix of ',' is not acceptable, it would fuck up server to server.
* A mode prefix of ':' will fuck up both server to server, and client to server.
@@ -573,21 +573,21 @@ void ModeParser::AddMode(ModeHandler* mh)
if (pm)
{
if ((pm->GetPrefix() > 126) || (pm->GetPrefix() == ',') || (pm->GetPrefix() == ':') || ServerInstance->Channels.IsPrefix(pm->GetPrefix()))
- throw ModuleException(mh->creator, INSP_FORMAT("Mode prefix for {} is invalid: {}", mh->name, pm->GetPrefix()));
+ throw ModuleException(mh->creator, "Mode prefix for {} is invalid: {}", mh->name, pm->GetPrefix());
PrefixMode* otherpm = FindPrefix(pm->GetPrefix());
if (otherpm)
{
- throw ModuleException(mh->creator, INSP_FORMAT("Mode prefix for {} already used by {} from {}: {}",
- mh->name, otherpm->name, otherpm->creator->ModuleFile, pm->GetPrefix()));
+ throw ModuleException(mh->creator, "Mode prefix for {} already used by {} from {}: {}",
+ mh->name, otherpm->name, otherpm->creator->ModuleFile, pm->GetPrefix());
}
}
ModeHandler*& slot = modehandlers[mh->GetModeType()][ModeParser::GetModeIndex(mh->GetModeChar())];
if (slot)
{
- throw ModuleException(mh->creator, INSP_FORMAT("Mode letter for {} already used by {} from {}: {}",
- mh->name, slot->name, slot->creator->ModuleFile, mh->GetModeChar()));
+ throw ModuleException(mh->creator, "Mode letter for {} already used by {} from {}: {}",
+ mh->name, slot->name, slot->creator->ModuleFile, mh->GetModeChar());
}
// The mode needs an id if it is either a user mode, a simple mode (flag) or a parameter mode.
@@ -600,8 +600,8 @@ void ModeParser::AddMode(ModeHandler* mh)
if (!res.second)
{
ModeHandler* othermh = res.first->second;
- throw ModuleException(mh->creator, INSP_FORMAT("Mode name {} already used by {} from {}",
- mh->name, othermh->GetModeChar(), othermh->creator->ModuleFile));
+ throw ModuleException(mh->creator, "Mode name {} already used by {} from {}",
+ mh->name, othermh->GetModeChar(), othermh->creator->ModuleFile);
}
// Everything is fine, add the mode