aboutsummaryrefslogtreecommitdiffstats
path: root/modules/log_sql.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-07-10 11:15:52 +0100
committerGravatar Sadie Powell2026-07-10 11:58:06 +0100
commit5f9c2b3c97ed1eeb19270fd3582b71ca8e1ca1ac (patch)
treea6d3d38e04f30b0906141f49d4e0fd643be1d0d9 /modules/log_sql.cpp
parentConvert 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.cpp3
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());