summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/inspircd.conf.example22
-rw-r--r--include/inspircd.h21
-rw-r--r--src/channels.cpp2
-rw-r--r--src/inspircd.cpp18
-rw-r--r--src/modules/m_alltime.cpp9
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_conn_join.cpp2
-rw-r--r--src/modules/m_cycle.cpp2
-rw-r--r--src/modules/m_denychans.cpp2
-rw-r--r--src/modules/m_operjoin.cpp2
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp25
-rw-r--r--src/modules/m_spanningtree/main.h9
-rw-r--r--src/modules/m_spanningtree/netburst.cpp2
-rw-r--r--src/modules/m_spanningtree/time.cpp28
-rw-r--r--src/modules/m_spanningtree/timesynctimer.cpp9
-rw-r--r--src/modules/m_spanningtree/timesynctimer.h10
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp14
-rw-r--r--src/modules/m_spanningtree/utils.cpp2
-rw-r--r--src/modules/m_spanningtree/utils.h10
-rw-r--r--src/modules/m_spanningtree/whois.cpp2
-rw-r--r--src/userprocess.cpp2
-rw-r--r--src/users.cpp2
25 files changed, 24 insertions, 179 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example
index 9feeb3c4d..aeec76531 100644
--- a/docs/inspircd.conf.example
+++ b/docs/inspircd.conf.example
@@ -994,28 +994,6 @@
moronbanner="You're banned! Email haha@abuse.com with the ERROR line below for help."
exemptchanops="">
-#-#-#-#-#-#-#-#-#-#-#-#-#-#- TIME SYNC OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#
-# Time synchronisation options for m_spanningtree linking. #
-# #
-# Because IRC is very time and clock dependent, InspIRCd provides its #
-# own methods for synchronisation of time between servers as shown #
-# in the example below, for servers that don't have ntpd running. #
-# #
-# enable - If this value is 'yes', 'true', or '1', time #
-# synchronisation is enabled on this server. This #
-# means any servers you are linked to will #
-# automatically synchronise time, however you should #
-# use ntpd instead where possible, NOT this option. #
-# #
-# master - If this value is set to yes, then this server will #
-# act as the authoritative time source for the whole #
-# network. All other servers will respect its time #
-# without question, and match their times to it. #
-# only one server should have the master value set #
-# to 'yes'. #
-# #
-<timesync enable="no" master="no">
-
#-#-#-#-#-#-#-#-#-#-#-#-#- WHOWAS OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
# This tag lets you define the behaviour of the /whowas command of #
diff --git a/include/inspircd.h b/include/inspircd.h
index ec7fbd63a..5f528c16b 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -304,11 +304,6 @@ class CoreExport InspIRCd : public classbase
*/
socklen_t length;
- /** Time offset in seconds
- * This offset is added to all calls to Time(). Use SetTimeDelta() to update
- */
- int time_delta;
-
#ifdef WIN32
IPC* WindowsIPC;
#endif
@@ -440,23 +435,9 @@ class CoreExport InspIRCd : public classbase
/** Get the current time
* Because this only calls time() once every time around the mainloop,
* it is much faster than calling time() directly.
- * @param delta True to use the delta as an offset, false otherwise
* @return The current time as an epoch value (time_t)
*/
- time_t Time(bool delta = false);
-
- /** Set the time offset in seconds
- * This offset is added to Time() to offset the system time by the specified
- * number of seconds.
- * @param delta The number of seconds to offset
- * @return The old time delta
- */
- int SetTimeDelta(int delta);
-
- /** Get the time offset in seconds
- * @return The current time delta (in seconds)
- */
- int GetTimeDelta();
+ time_t Time();
/** Process a user whos socket has been flagged as active
* @param cu The user to process
diff --git a/src/channels.cpp b/src/channels.cpp
index 2140a37ae..793bfb429 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -26,7 +26,7 @@ Channel::Channel(InspIRCd* Instance, const std::string &cname, time_t ts) : Serv
(*(ServerInstance->chanlist))[cname.c_str()] = this;
strlcpy(this->name, cname.c_str(), CHANMAX);
- this->created = ts ? ts : ServerInstance->Time(true);
+ this->created = ts ? ts : ServerInstance->Time();
this->age = this->created;
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 9748e9472..f4ec4e8bd 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -339,7 +339,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
this->Config->operclass.clear();
this->TIME = this->OLDTIME = this->startup_time = time(NULL);
- this->time_delta = 0;
srand(this->TIME);
*this->LogFileName = 0;
@@ -740,26 +739,11 @@ bool InspIRCd::AllModulesReportReady(User* user)
return true;
}
-time_t InspIRCd::Time(bool delta)
+time_t InspIRCd::Time()
{
- if (delta)
- return TIME + time_delta;
return TIME;
}
-int InspIRCd::SetTimeDelta(int delta)
-{
- int old = time_delta;
- time_delta = delta;
- this->Log(DEBUG, "Time delta set to %d (was %d)", time_delta, old);
- return old;
-}
-
-int InspIRCd::GetTimeDelta()
-{
- return time_delta;
-}
-
void InspIRCd::SetSignal(int signal)
{
*mysig = signal;
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 83dbe53b8..75ed4f355 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -28,16 +28,11 @@ class CommandAlltime : public Command
CmdResult Handle(const char* const* parameters, int pcnt, User *user)
{
char fmtdate[64];
- char fmtdate2[64];
- time_t now = ServerInstance->Time(false);
+ time_t now = ServerInstance->Time();
strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&now));
- now = ServerInstance->Time(true);
- strftime(fmtdate2, sizeof(fmtdate2), "%F %T", gmtime(&now));
-
- int delta = ServerInstance->GetTimeDelta();
std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
- ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds): Time with delta: "+ fmtdate2;
+ ServerInstance->Config->ServerName + " is: " + fmtdate;
if (IS_LOCAL(user))
{
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index eaa25c1be..e5fbc9abd 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -307,7 +307,7 @@ class ModuleBanRedirect : public Module
user->WriteServ("474 %s %s :Cannot join channel (You are banned)", user->nick, chan->name);
user->WriteServ("470 %s :You are being automatically redirected to %s", user->nick, redir->targetchan.c_str());
nofollow = true;
- Channel::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", false, ServerInstance->Time());
nofollow = false;
return 1;
}
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index b3be3932b..21314a6ee 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -82,7 +82,7 @@ class ModuleConnJoin : public Module
for(std::vector<std::string>::iterator it = Joinchans.begin(); it != Joinchans.end(); it++)
if (ServerInstance->IsChannel(it->c_str()))
- Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time());
}
};
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 882d4232e..8d1c46fb3 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -62,7 +62,7 @@ class CommandCycle : public Command
if (!channel->PartUser(user, reason.c_str()))
delete channel;
- Channel::JoinUser(ServerInstance, user, parameters[0], true, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, parameters[0], true, "", false, ServerInstance->Time());
}
return CMD_LOCALONLY;
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 3a5ea7462..78e6cfea3 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -117,7 +117,7 @@ class ModuleDenyChannels : public Module
if ((!newchan) || (!(newchan->IsModeSet('L'))))
{
user->WriteServ("926 %s %s :Channel %s is forbidden, redirecting to %s: %s",user->nick,cname,cname,redirect.c_str(), reason.c_str());
- Channel::JoinUser(ServerInstance,user,redirect.c_str(),false,"",false,ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance,user,redirect.c_str(),false,"",false,ServerInstance->Time());
return 1;
}
}
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index 60796fd3f..d764c76d7 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -77,7 +77,7 @@ class ModuleOperjoin : public Module
for(std::vector<std::string>::iterator it = operChans.begin(); it != operChans.end(); it++)
if (ServerInstance->IsChannel(it->c_str()))
- Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time());
}
};
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index e944d6229..9dc8aa5b7 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -132,7 +132,7 @@ class ModuleRedirect : public Module
}
user->WriteServ("470 %s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick, cname, channel.c_str());
- Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time());
return 1;
}
}
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 4bc5d31a2..6e2243f08 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -50,7 +50,7 @@ class CommandSajoin : public Command
*/
if (IS_LOCAL(dest))
{
- Channel::JoinUser(ServerInstance, dest, parameters[1], true, "", false, ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, dest, parameters[1], true, "", false, ServerInstance->Time());
/* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propagate */
Channel* n = ServerInstance->FindChan(parameters[1]);
if (n)
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index dd288b821..0b6c4430a 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -68,7 +68,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
irc::tokenstream users((params.size() > 2) ? params[2] : ""); /* users from the user list */
bool apply_other_sides_modes = true; /* True if we are accepting the other side's modes */
Channel* chan = this->Instance->FindChan(channel); /* The channel we're sending joins to */
- time_t ourTS = chan ? chan->age : Instance->Time(true)+600; /* The TS of our side of the link */
+ time_t ourTS = chan ? chan->age : Instance->Time()+600; /* The TS of our side of the link */
bool created = !chan; /* True if the channel doesnt exist here yet */
std::string item; /* One item in the list of nicks */
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 119e98220..f72974381 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -42,14 +42,6 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
ServerInstance->AddCommand(command_rconnect);
command_rsquit = new cmd_rsquit(ServerInstance, this, Utils);
ServerInstance->AddCommand(command_rsquit);
- if (Utils->EnableTimeSync)
- {
- SyncTimer = new TimeSyncTimer(ServerInstance, this);
- ServerInstance->Timers->AddTimer(SyncTimer);
- }
- else
- SyncTimer = NULL;
-
RefreshTimer = new CacheRefreshTimer(ServerInstance, Utils);
ServerInstance->Timers->AddTimer(RefreshTimer);
@@ -416,17 +408,6 @@ int ModuleSpanningTree::HandleConnect(const char* const* parameters, int pcnt, U
return 1;
}
-void ModuleSpanningTree::BroadcastTimeSync()
-{
- if (Utils->MasterTime)
- {
- std::deque<std::string> params;
- params.push_back(ConvToStr(ServerInstance->Time(false)));
- params.push_back("FORCE");
- Utils->DoOneToMany(ServerInstance->Config->GetSID(), "TIMESET", params);
- }
-}
-
void ModuleSpanningTree::OnGetServerDescription(const std::string &servername,std::string &description)
{
TreeServer* s = Utils->FindServer(servername);
@@ -691,7 +672,7 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
/** IMPORTANT: We don't update the TS if the oldnick is just a case change of the newnick!
*/
if (irc::string(user->nick) != assign(oldnick))
- user->age = ServerInstance->Time(true);
+ user->age = ServerInstance->Time();
params.push_back(ConvToStr(user->age));
Utils->DoOneToMany(user->uuid,"NICK",params);
@@ -916,7 +897,7 @@ void ModuleSpanningTree::OnEvent(Event* event)
return;
(*params)[1] = ":" + (*params)[1];
params->insert(params->begin() + 1,ServerInstance->Config->ServerName);
- params->insert(params->begin() + 1,ConvToStr(ServerInstance->Time(true)));
+ params->insert(params->begin() + 1,ConvToStr(ServerInstance->Time()));
Utils->DoOneToMany(ServerInstance->Config->GetSID(),"FTOPIC",*params);
}
else if (event->GetEventID() == "send_mode")
@@ -1002,8 +983,6 @@ ModuleSpanningTree::~ModuleSpanningTree()
{
/* This will also free the listeners */
delete Utils;
- if (SyncTimer)
- ServerInstance->Timers->DelTimer(SyncTimer);
ServerInstance->Timers->DelTimer(RefreshTimer);
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index e8c83221e..4002ad61e 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -33,7 +33,6 @@ const long ProtocolVersion = 1200;
class cmd_rconnect;
class cmd_rsquit;
class SpanningTreeUtilities;
-class TimeSyncTimer;
class CacheRefreshTimer;
class TreeServer;
class Link;
@@ -51,10 +50,6 @@ class ModuleSpanningTree : public Module
SpanningTreeUtilities* Utils;
public:
- /** Timer for clock syncs
- */
- TimeSyncTimer *SyncTimer;
-
CacheRefreshTimer *RefreshTimer;
/** Constructor
@@ -137,10 +132,6 @@ class ModuleSpanningTree : public Module
*/
int HandleConnect(const char* const* parameters, int pcnt, User* user);
- /** Send out time sync to all servers
- */
- void BroadcastTimeSync();
-
/** Attempt to send a message to a user
*/
void RemoteMessage(User* user, const char* format, ...);
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index 86d13e96f..062aed855 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -29,7 +29,7 @@
void TreeSocket::DoBurst(TreeServer* s)
{
std::string name = s->GetName();
- std::string burst = ":" + this->Instance->Config->GetSID() + " BURST " +ConvToStr(Instance->Time(true));
+ std::string burst = ":" + this->Instance->Config->GetSID() + " BURST " +ConvToStr(Instance->Time());
std::string endburst = ":" + this->Instance->Config->GetSID() + " ENDBURST";
this->Instance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s).", name.c_str(), this->GetTheirChallenge().empty() ? "plaintext password" : "SHA256-HMAC challenge-response");
this->WriteLine(burst);
diff --git a/src/modules/m_spanningtree/time.cpp b/src/modules/m_spanningtree/time.cpp
index 415ccbbad..3bf1e67b1 100644
--- a/src/modules/m_spanningtree/time.cpp
+++ b/src/modules/m_spanningtree/time.cpp
@@ -30,32 +30,6 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */
-bool TreeSocket::HandleSetTime(const std::string &prefix, std::deque<std::string> &params)
-{
- if (!params.size() || !Utils->EnableTimeSync)
- return true;
-
- bool force = false;
-
- if ((params.size() == 2) && (params[1] == "FORCE"))
- force = true;
-
- time_t them = atoi(params[0].c_str());
- time_t us = Instance->Time(false);
-
- time_t diff = them - us;
-
- Utils->DoOneToAllButSender(prefix, "TIMESET", params, prefix);
-
- if (force || (them != us))
- {
- time_t old = Instance->SetTimeDelta(diff);
- Instance->Log(DEBUG, "TS (diff %d) from %s applied (old delta was %d)", diff, prefix.c_str(), old);
- }
-
- return true;
-}
-
bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params)
{
// :source.server TIME remote.server sendernick
@@ -68,7 +42,7 @@ bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params
User* u = this->Instance->FindNick(params[1]);
if (u)
{
- params.push_back(ConvToStr(Instance->Time(false)));
+ params.push_back(ConvToStr(Instance->Time()));
params[0] = prefix;
Utils->DoOneToOne(this->Instance->Config->GetSID(),"TIME",params,params[0]);
}
diff --git a/src/modules/m_spanningtree/timesynctimer.cpp b/src/modules/m_spanningtree/timesynctimer.cpp
index 0f0021ddf..bea28f1e4 100644
--- a/src/modules/m_spanningtree/timesynctimer.cpp
+++ b/src/modules/m_spanningtree/timesynctimer.cpp
@@ -28,15 +28,6 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */
-TimeSyncTimer::TimeSyncTimer(InspIRCd *Inst, ModuleSpanningTree *Mod) : Timer(600, Inst->Time(), true), Instance(Inst), Module(Mod)
-{
-}
-
-void TimeSyncTimer::Tick(time_t TIME)
-{
- Module->BroadcastTimeSync();
-}
-
CacheRefreshTimer::CacheRefreshTimer(InspIRCd *Inst, SpanningTreeUtilities *Util) : Timer(3600, Inst->Time(), true), Instance(Inst), Utils(Util)
{
}
diff --git a/src/modules/m_spanningtree/timesynctimer.h b/src/modules/m_spanningtree/timesynctimer.h
index 7964c98d9..3f97255b3 100644
--- a/src/modules/m_spanningtree/timesynctimer.h
+++ b/src/modules/m_spanningtree/timesynctimer.h
@@ -24,16 +24,6 @@ class InspIRCd;
* Timer is only one-shot however, so at the end of each Tick() we simply
* insert another of ourselves into the pending queue :)
*/
-class TimeSyncTimer : public Timer
-{
- private:
- InspIRCd *Instance;
- ModuleSpanningTree *Module;
- public:
- TimeSyncTimer(InspIRCd *Instance, ModuleSpanningTree *Mod);
- virtual void Tick(time_t TIME);
-};
-
class CacheRefreshTimer : public Timer
{
private:
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 2fc847b0c..76920d6e6 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -160,11 +160,10 @@ bool TreeSocket::ProcessLine(std::string &line)
}
else if (command == "BURST")
{
- if (params.size() && Utils->EnableTimeSync)
+ if (params.size())
{
- bool we_have_delta = (Instance->Time(false) != Instance->Time(true));
time_t them = atoi(params[0].c_str());
- time_t delta = them - Instance->Time(false);
+ 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));
@@ -175,13 +174,6 @@ bool TreeSocket::ProcessLine(std::string &line)
{
Instance->SNO->WriteToSnoMask('l',"\2WARNING\2: Your clocks are out by %d seconds. Please consider synching your clocks.", abs(delta));
}
-
- if (!Utils->MasterTime && !we_have_delta)
- {
- this->Instance->SetTimeDelta(delta);
- // Send this new timestamp to any other servers
- Utils->DoOneToMany(Instance->Config->GetSID(), "TIMESET", params);
- }
}
this->LinkState = CONNECTED;
Link* lnk = Utils->FindLink(InboundServerName);
@@ -283,7 +275,7 @@ bool TreeSocket::ProcessLine(std::string &line)
* When there is activity on the socket, reset the ping counter so
* that we're not wasting bandwidth pinging an active server.
*/
- route_back_again->SetNextPingTime(time(NULL) + Utils->PingFreq);
+ route_back_again->SetNextPingTime(Instance->Time() + Utils->PingFreq);
route_back_again->SetPingFlag();
}
else
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 3c7ee2cf0..fb4a81ba1 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -448,8 +448,6 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
FlatLinks = Conf->ReadFlag("options","flatlinks",0);
HideULines = Conf->ReadFlag("options","hideulines",0);
AnnounceTSChange = Conf->ReadFlag("options","announcets",0);
- EnableTimeSync = Conf->ReadFlag("timesync","enable",0);
- MasterTime = Conf->ReadFlag("timesync", "master", 0);
ChallengeResponse = !Conf->ReadFlag("options", "disablehmac", 0);
quiet_bursts = Conf->ReadFlag("options", "quietbursts", 0);
PingWarnTime = Conf->ReadInteger("options", "pingwarning", 0, true);
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 3bbff7ea6..c824b75ed 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -61,9 +61,7 @@ class SpanningTreeUtilities
/** Announce TS changes to channels on merge
*/
bool AnnounceTSChange;
- /** Synchronize timestamps between servers
- */
- bool EnableTimeSync;
+
/** Make snomasks +CQ quiet during bursts and splits
*/
bool quiet_bursts;
@@ -93,12 +91,6 @@ class SpanningTreeUtilities
*/
std::vector<Link> LinkBlocks;
- /** If this is true, this server is the master sync server for time
- * synching - e.g. it is the server with its clock correct. It will
- * send out the correct time at intervals.
- */
- bool MasterTime;
-
/** List of module pointers which can provide I/O abstraction
*/
hookmodules hooks;
diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/whois.cpp
index 155b0e838..4ee485503 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> &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(true)));
+ snprintf(idle, MAXBUF, "%lu", (unsigned long)abs((x->idle_lastmsg) - Instance->Time()));
std::deque<std::string> par;
par.push_back(prefix);
par.push_back(signon);
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index dd1ca1799..3ba09a759 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -216,7 +216,7 @@ void InspIRCd::DoBackgroundUserStuff()
// This user didn't answer the last ping, remove them
if (!curr->lastping)
{
- time_t time = this->Time(false) - (curr->nping - curr->MyClass->GetPingTime());
+ time_t time = this->Time() - (curr->nping - curr->MyClass->GetPingTime());
char message[MAXBUF];
snprintf(message, MAXBUF, "Ping timeout: %ld second%s", (long)time, time > 1 ? "s" : "");
curr->lastping = 1;
diff --git a/src/users.cpp b/src/users.cpp
index f6ef92af3..8fdf336cc 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -177,7 +177,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance
*password = *nick = *ident = *host = *dhost = *fullname = *awaymsg = *oper = *uuid = 0;
server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName);
reset_due = ServerInstance->Time();
- age = ServerInstance->Time(true);
+ age = ServerInstance->Time();
Penalty = 0;
lines_in = lastping = signon = idle_lastmsg = nping = registered = 0;
ChannelCount = timeout = bytes_in = bytes_out = cmds_in = cmds_out = 0;