From b22124cbc3f4fb365a743cd5d5bb76223e48eeed Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 13 Jun 2008 17:52:11 +0000 Subject: Win32 compilation fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9904 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_whois.cpp | 3 ++- src/modules/m_spanningtree/treesocket2.cpp | 6 +++--- src/modules/m_spanningtree/whois.cpp | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 8afc23525..29264348c 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -137,7 +137,7 @@ CmdResult CommandWhois::Handle (const std::vector& parameters, User */ if (IS_LOCAL(dest) && (!*ServerInstance->Config->HideWhoisServer || parameters.size() > 1)) { - idle = abs((dest->idle_lastmsg)-ServerInstance->Time()); + idle = abs((long)((dest->idle_lastmsg)-ServerInstance->Time())); signon = dest->signon; } @@ -154,3 +154,4 @@ CmdResult CommandWhois::Handle (const std::vector& parameters, User return CMD_SUCCESS; } + 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 ¶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 par; par.push_back(prefix); par.push_back(signon); @@ -87,3 +87,4 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque ¶m return true; } + -- cgit v1.2.3