aboutsummaryrefslogtreecommitdiffstats
path: root/modules/services.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-08-22 10:26:43 +0100
committerGravatar Sadie Powell2024-08-22 11:12:52 +0100
commit6b123d4bc61c2db8e379dd5e681834c4053e661d (patch)
tree77621bb30f54b0c444e31a78b2c5c9a67955b723 /modules/services.cpp
parentMerge branch 'insp4' into master. (diff)
Use C++20 <format> instead of fmtlib when available.
Diffstat (limited to 'modules/services.cpp')
-rw-r--r--modules/services.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/services.cpp b/modules/services.cpp
index ad0120798..fbfd8bcb6 100644
--- a/modules/services.cpp
+++ b/modules/services.cpp
@@ -121,7 +121,7 @@ public:
{
if (IS_LOCAL(source))
{
- source->WriteNumeric(ERR_NOPRIVILEGES, fmt::format("Only a server may modify the +{} channel mode", GetModeChar()));
+ source->WriteNumeric(ERR_NOPRIVILEGES, FMT::format("Only a server may modify the +{} channel mode", GetModeChar()));
return false;
}
@@ -145,7 +145,7 @@ public:
{
if (IS_LOCAL(source))
{
- source->WriteNumeric(ERR_NOPRIVILEGES, fmt::format("Only a server may modify the +{} user mode", GetModeChar()));
+ source->WriteNumeric(ERR_NOPRIVILEGES, FMT::format("Only a server may modify the +{} user mode", GetModeChar()));
return false;
}
@@ -202,7 +202,7 @@ public:
void Apply(User* u) override
{
- u->WriteNumeric(RPL_SAVENICK, u->nick, fmt::format("Services reserved nickname: {}", reason));
+ u->WriteNumeric(RPL_SAVENICK, u->nick, FMT::format("Services reserved nickname: {}", reason));
u->ChangeNick(u->uuid);
}
@@ -615,7 +615,7 @@ private:
if (mlock->find(change.mh->GetModeChar()) == std::string::npos)
return true; // Mode is not locked.
- user->WriteNumeric(ERR_MLOCKRESTRICTED, chan->name, change.mh->GetModeChar(), *mlock, fmt::format("Mode cannot be changed as it has been locked {} by services!",
+ user->WriteNumeric(ERR_MLOCKRESTRICTED, chan->name, change.mh->GetModeChar(), *mlock, FMT::format("Mode cannot be changed as it has been locked {} by services!",
chan->IsModeSet(change.mh) ? "on" : "off"));
return false;
}
@@ -640,7 +640,7 @@ private:
if (!target->IsModeSet(servprotectmode))
return true; // Target is not a protected service.
- user->WriteNumeric(ERR_RESTRICTED, chan->name, fmt::format("You are not permitted to remove privileges from {} services!", ServerInstance->Config->Network));
+ user->WriteNumeric(ERR_RESTRICTED, chan->name, FMT::format("You are not permitted to remove privileges from {} services!", ServerInstance->Config->Network));
return false;
}
@@ -707,7 +707,7 @@ public:
if (dest->IsModeSet(servprotectmode))
{
- source->WriteNumeric(ERR_KILLDENY, fmt::format("You are not permitted to kill {} services!", ServerInstance->Config->Network));
+ source->WriteNumeric(ERR_KILLDENY, FMT::format("You are not permitted to kill {} services!", ServerInstance->Config->Network));
return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;
@@ -749,7 +749,7 @@ public:
{
if (memb->user->IsModeSet(servprotectmode))
{
- source->WriteNumeric(ERR_RESTRICTED, memb->chan->name, fmt::format("You are not permitted to kick {} services!", ServerInstance->Config->Network));
+ source->WriteNumeric(ERR_RESTRICTED, memb->chan->name, FMT::format("You are not permitted to kick {} services!", ServerInstance->Config->Network));
return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;
@@ -772,7 +772,7 @@ public:
}
}
- user->WriteNumeric(ERR_ERRONEUSNICKNAME, newnick, fmt::format("Services reserved nickname: {}", svshold->reason));
+ user->WriteNumeric(ERR_ERRONEUSNICKNAME, newnick, FMT::format("Services reserved nickname: {}", svshold->reason));
return MOD_RES_DENY;
}