aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-23 23:48:09 +0000
committerGravatar Sadie Powell2023-01-24 00:12:57 +0000
commit206d31de85192353d03c74766e80513a87dc49b4 (patch)
tree24fdee802c85c29b66a04901147d019e92e30931 /src/modules/m_permchannels.cpp
parentConvert WriteToSnoMask/WriteGlobalSno to use fmtlib format strings. (diff)
Convert log calls to use fmtlib format strings
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index bd0cf63ce..24fc5bd8b 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -77,7 +77,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes)
std::ofstream stream(permchannelsnewconf);
if (!stream.is_open())
{
- ServerInstance->Logs.Error(MODNAME, "Cannot create database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Error(MODNAME, "Cannot create database \"{}\"! {} ({})", permchannelsnewconf, strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('a', "database: cannot create new permchan db \"{}\": {} ({})", permchannelsnewconf, strerror(errno), errno);
return false;
}
@@ -149,7 +149,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes)
if (stream.fail())
{
- ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"{}\"! {} ({})", permchannelsnewconf, strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('a', "database: cannot write to new permchan db \"{}\": {} ({})", permchannelsnewconf, strerror(errno), errno);
return false;
}
@@ -161,7 +161,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes)
// Use rename to move temporary to new db - this is guaranteed not to fuck up, even in case of a crash.
if (rename(permchannelsnewconf.c_str(), permchannelsconf.c_str()) < 0)
{
- ServerInstance->Logs.Error(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Error(MODNAME, "Cannot replace old database \"{}\" with new database \"{}\"! {} ({})", permchannelsconf, permchannelsnewconf, strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('a', "database: cannot replace old permchan db \"{}\" with new db \"{}\": {} ({})", permchannelsconf, permchannelsnewconf, strerror(errno), errno);
return false;
}
@@ -234,7 +234,7 @@ public:
c->SetTopic(ServerInstance->FakeClient, topic, topicset, &topicsetby);
}
- ServerInstance->Logs.Debug(MODNAME, "Added %s with topic %s", channel.c_str(), c->topic.c_str());
+ ServerInstance->Logs.Debug(MODNAME, "Added {} with topic {}", channel, c->topic);
std::string modes = tag->getString("modes");
if (modes.empty())
@@ -317,7 +317,7 @@ public:
}
catch (const CoreException& e)
{
- ServerInstance->Logs.Error(MODNAME, "Error loading permchannels database: %s", e.what());
+ ServerInstance->Logs.Error(MODNAME, "Error loading permchannels database: {}", e.what());
}
}
}