diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/whois.cpp | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 5a6a9f301..806b8ab36 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -164,13 +164,13 @@ bool TreeSocket::ProcessLine(std::string &line) time_t delta = them - Instance->Time(); if ((delta < -600) || (delta > 600)) { - Instance->SNO->WriteToSnoMask('l',"\2ERROR\2: Your clocks are out by %d seconds (this is more than five minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs(delta)); - SendError("Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than five minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!"); + Instance->SNO->WriteToSnoMask('l',"\2ERROR\2: Your clocks are out by %d seconds (this is more than five minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs((long)delta)); + SendError("Your clocks are out by "+ConvToStr(abs((long)delta))+" seconds (this is more than five minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!"); return false; } else if ((delta < -30) || (delta > 30)) { - Instance->SNO->WriteToSnoMask('l',"\2WARNING\2: Your clocks are out by %d seconds. Please consider synching your clocks.", abs(delta)); + Instance->SNO->WriteToSnoMask('l',"\2WARNING\2: Your clocks are out by %d seconds. Please consider synching your clocks.", abs((long)delta)); } } this->LinkState = CONNECTED; diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/whois.cpp index 4ee485503..a67b57284 100644 --- a/src/modules/m_spanningtree/whois.cpp +++ b/src/modules/m_spanningtree/whois.cpp @@ -46,7 +46,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> ¶m char signon[MAXBUF]; char idle[MAXBUF]; snprintf(signon, MAXBUF, "%lu", (unsigned long)x->signon); - snprintf(idle, MAXBUF, "%lu", (unsigned long)abs((x->idle_lastmsg) - Instance->Time())); + snprintf(idle, MAXBUF, "%lu", (unsigned long)abs((long)((x->idle_lastmsg) - Instance->Time()))); std::deque<std::string> par; par.push_back(prefix); par.push_back(signon); @@ -87,3 +87,4 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> ¶m return true; } + |