diff options
| author | 2026-07-10 11:15:52 +0100 | |
|---|---|---|
| committer | 2026-07-10 11:58:06 +0100 | |
| commit | 5f9c2b3c97ed1eeb19270fd3582b71ca8e1ca1ac (patch) | |
| tree | a6d3d38e04f30b0906141f49d4e0fd643be1d0d9 /modules/log_sql.cpp | |
| parent | Convert TLS::IOHook::Status to an enum class. (diff) | |
Use saturating adds/subtracts when handling timestamps.
Diffstat (limited to 'modules/log_sql.cpp')
| -rw-r--r-- | modules/log_sql.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/log_sql.cpp b/modules/log_sql.cpp index 4bfed1355..13fa3f63c 100644 --- a/modules/log_sql.cpp +++ b/modules/log_sql.cpp @@ -19,6 +19,7 @@ #include "inspircd.h" #include "modules/sql.h" +#include "timeutils.h" namespace { @@ -65,7 +66,7 @@ public: if (!sql) { // Only give a warning every 5 minutes to avoid log spam. - if (ServerInstance->Time() - lastwarning > 300) + if (Time::Ago(lastwarning) > 300) { lastwarning = ServerInstance->Time(); ServerInstance->SNO.WriteGlobalSno('a', "Unable to write to SQL log (database {} not available).", sql->GetId()); |
