From 206d31de85192353d03c74766e80513a87dc49b4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 23 Jan 2023 23:48:09 +0000 Subject: Convert log calls to use fmtlib format strings --- src/modules/m_permchannels.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_permchannels.cpp') 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()); } } } -- cgit v1.3.1-10-gc9f91