diff options
| author | 2019-02-07 12:14:07 +0000 | |
|---|---|---|
| committer | 2019-02-07 12:14:07 +0000 | |
| commit | e862582e7e11a8badb4a92d001a3d53eae2d2401 (patch) | |
| tree | 264fed5a28c45995c5d296d56622a0d0601de06e /src/modules/m_xline_db.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
LogManager: remove fakederef.
Diffstat (limited to 'src/modules/m_xline_db.cpp')
| -rw-r--r-- | src/modules/m_xline_db.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 9d9c9e431..48eb9badd 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -81,17 +81,17 @@ class ModuleXLineDB : public Module * Technically, that means that this can block, but I have *never* seen that. * -- w00t */ - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Opening temporary database"); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Opening temporary database"); std::string xlinenewdbpath = xlinedbpath + ".new"; std::ofstream stream(xlinenewdbpath.c_str()); if (!stream.is_open()) { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO->WriteToSnoMask('x', "database: cannot create new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); return false; } - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Opened. Writing.."); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Opened. Writing.."); /* * Now, much as I hate writing semi-unportable formats, additional @@ -119,11 +119,11 @@ class ModuleXLineDB : public Module } } - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Finished writing XLines. Checking for error.."); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Finished writing XLines. Checking for error.."); if (stream.fail()) { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO->WriteToSnoMask('x', "database: cannot write to new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); return false; } @@ -135,7 +135,7 @@ class ModuleXLineDB : public Module // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash. if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0) { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO->WriteToSnoMask('x', "database: cannot replace old xline db \"%s\" with new db \"%s\": %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); return false; } @@ -152,7 +152,7 @@ class ModuleXLineDB : public Module std::ifstream stream(xlinedbpath.c_str()); if (!stream.is_open()) { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); ServerInstance->SNO->WriteToSnoMask('x', "database: cannot read xline db \"%s\": %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); return false; } @@ -172,14 +172,14 @@ class ModuleXLineDB : public Module items++; } - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Processing %s", line.c_str()); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Processing %s", line.c_str()); if (command_p[0] == "VERSION") { if (command_p[1] != "1") { stream.close(); - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "I got database version %s - I don't understand it", command_p[1].c_str()); + ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "I got database version %s - I don't understand it", command_p[1].c_str()); ServerInstance->SNO->WriteToSnoMask('x', "database: I got a database version (%s) I don't understand", command_p[1].c_str()); return false; } |
