aboutsummaryrefslogtreecommitdiff
path: root/modules/spanningtree/treesocket2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/spanningtree/treesocket2.cpp')
-rw-r--r--modules/spanningtree/treesocket2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/spanningtree/treesocket2.cpp b/modules/spanningtree/treesocket2.cpp
index 38bf333f7..bd667f0c8 100644
--- a/modules/spanningtree/treesocket2.cpp
+++ b/modules/spanningtree/treesocket2.cpp
@@ -164,13 +164,13 @@ void TreeSocket::ProcessLine(std::string& line)
time_t delta = std::abs(them - ServerInstance->Time());
if (delta > 15)
{
- ServerInstance->SNO.WriteGlobalSno('l', "\002ERROR\002: Your clocks are off by {} seconds (this is more than fifteen seconds). Link aborted, \002PLEASE SYNC YOUR CLOCKS!\002", delta);
- SendError(FMT::format("Your clocks are out by {} seconds (this is more than fifteen seconds). Link aborted, PLEASE SYNC YOUR CLOCKS!", delta));
+ ServerInstance->SNO.WriteGlobalSno('l', "\002ERROR\002: Your clocks are off by {} (this is more than fifteen seconds). Link aborted, \002PLEASE SYNC YOUR CLOCKS!\002", Duration::ToHuman(delta));
+ SendError(FMT::format("Your clocks are out by {} (this is more than fifteen seconds). Link aborted, PLEASE SYNC YOUR CLOCKS!", Duration::ToHuman(delta)));
return;
}
- else if ((delta < -5) || (delta > 5))
+ else if (delta > 5)
{
- ServerInstance->SNO.WriteGlobalSno('l', "\002WARNING\002: Your clocks are off by {} seconds. Please consider syncing your clocks.", labs((long)delta));
+ ServerInstance->SNO.WriteGlobalSno('l', "\002WARNING\002: Your clocks are off by {}. Please consider syncing your clocks.", Duration::ToHuman(delta));
}
}
@@ -436,7 +436,7 @@ void TreeSocket::Close()
time_t server_uptime = ServerInstance->Time() - this->age;
if (server_uptime)
{
- std::string timestr = Duration::ToString(server_uptime);
+ std::string timestr = Duration::ToHuman(server_uptime);
ServerInstance->SNO.WriteGlobalSno('l', "Connection to '\002{}\002' was established for {}", linkID, timestr);
}
}