Win32 compilation fixes

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9904 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2008-06-13 17:52:11 +00:00
parent bbac74618e
commit b22124cbc3
4 changed files with 7 additions and 13 deletions

View File

@ -137,7 +137,7 @@ CmdResult CommandWhois::Handle (const std::vector<std::string>& 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<std::string>& parameters, User
return CMD_SUCCESS;
}

View File

@ -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;

View File

@ -46,7 +46,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> &param
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> &param
return true;
}

View File

@ -252,14 +252,6 @@ void Run()
get_string_option("In what directory is the IRCd binary to be placed?", ".", bin_dir);
get_string_option("In what directory are the IRCd libraries to be placed?", "../lib", library_dir);
printf_c("The following questions will ask you for various figures relating\n"
"To your IRCd install. Please note that these should usually be left\n"
"as defaults unless you have a real reason to change them. If they\n"
"changed, then the values must be identical on all servers on your\n"
"network, or malfunctions and/or crashes may occur, with the exception\n"
"of the 'maximum number of clients' setting which may be different on\n"
"different servers on the network.\n\n");
// NOTE: this may seem hackish (generating a batch build script), but it assures the user knows
// what they're doing, and we don't have to mess with copying files and changing around modules.mak
// for the extra libraries. --fez