aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-11 12:39:49 +0100
committerGravatar Sadie Powell2023-08-11 12:39:49 +0100
commitf73e9e606b61324f4ac34d3f506b7cbaf87713c7 (patch)
tree1ca0ac7ed371483bd1d9a3fbec3959af61067dbb /src/modules/m_permchannels.cpp
parentMake the linkdata host/unix cloaks longer to test suffix truncation. (diff)
Rename the error log level to critical.
"ERROR" is apparently defined by more than just Windows. Let's pick a different name which is less likely to cause collisions.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 37e11fa55..5e404ab9c 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -79,7 +79,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes)
std::ofstream stream(permchannelsnewconf);
if (!stream.is_open())
{
- ServerInstance->Logs.Error(MODNAME, "Cannot create database \"{}\"! {} ({})", permchannelsnewconf, strerror(errno), errno);
+ ServerInstance->Logs.Critical(MODNAME, "Cannot create database \"{}\"! {} ({})", permchannelsnewconf, strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('a', "database: cannot create new permchan db \"{}\": {} ({})", permchannelsnewconf, strerror(errno), errno);
return false;
}
@@ -151,7 +151,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes)
if (stream.fail())
{
- ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"{}\"! {} ({})", permchannelsnewconf, strerror(errno), errno);
+ ServerInstance->Logs.Critical(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;
}
@@ -163,7 +163,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 \"{}\" with new database \"{}\"! {} ({})", permchannelsconf, permchannelsnewconf, strerror(errno), errno);
+ ServerInstance->Logs.Critical(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;
}
@@ -342,7 +342,7 @@ public:
}
catch (const CoreException& e)
{
- ServerInstance->Logs.Error(MODNAME, "Error loading permchannels database: {}", e.what());
+ ServerInstance->Logs.Critical(MODNAME, "Error loading permchannels database: {}", e.what());
}
}
}