From e23ee3fde17a6bb17a9e56c7105f4bbceb36391f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 18 Jan 2022 03:30:22 +0000 Subject: Rewrite logging calls to use the new APIs. --- src/modules/m_permchannels.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_permchannels.cpp') diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index cbc6097a2..24f467ac8 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -77,7 +77,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list std::ofstream stream(permchannelsnewconf); if (!stream.is_open()) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Cannot create database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Normal(MODNAME, "Cannot create database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot create new permchan db \"%s\": %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -145,7 +145,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list if (stream.fail()) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Cannot write to new database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Normal(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot write to new permchan db \"%s\": %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -157,7 +157,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list // 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.Log(MODNAME, LOG_DEFAULT, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Normal(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot replace old permchan db \"%s\" with new db \"%s\": %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -207,7 +207,7 @@ public: if (!ServerInstance->Channels.IsChannel(channel)) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")"); + ServerInstance->Logs.Normal(MODNAME, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")"); continue; } @@ -230,7 +230,7 @@ public: c->SetTopic(ServerInstance->FakeClient, topic, topicset, &topicsetby); } - ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Added %s with topic %s", channel.c_str(), c->topic.c_str()); + ServerInstance->Logs.Debug(MODNAME, "Added %s with topic %s", channel.c_str(), c->topic.c_str()); std::string modes = tag->getString("modes"); if (modes.empty()) @@ -313,7 +313,7 @@ public: } catch (CoreException& e) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Error loading permchannels database: " + std::string(e.GetReason())); + ServerInstance->Logs.Normal(MODNAME, "Error loading permchannels database: " + std::string(e.GetReason())); } } } -- cgit v1.3.1-10-gc9f91