]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Nuke TIMESYNC from orbit \o/
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 22 Feb 2008 16:40:02 +0000 (16:40 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 22 Feb 2008 16:40:02 +0000 (16:40 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8998 e03df62e-2008-0410-955e-edbf42e46eb7

25 files changed:
docs/inspircd.conf.example
include/inspircd.h
src/channels.cpp
src/inspircd.cpp
src/modules/m_alltime.cpp
src/modules/m_banredirect.cpp
src/modules/m_conn_join.cpp
src/modules/m_cycle.cpp
src/modules/m_denychans.cpp
src/modules/m_operjoin.cpp
src/modules/m_redirect.cpp
src/modules/m_sajoin.cpp
src/modules/m_spanningtree/fjoin.cpp
src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/main.h
src/modules/m_spanningtree/netburst.cpp
src/modules/m_spanningtree/time.cpp
src/modules/m_spanningtree/timesynctimer.cpp
src/modules/m_spanningtree/timesynctimer.h
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/utils.cpp
src/modules/m_spanningtree/utils.h
src/modules/m_spanningtree/whois.cpp
src/userprocess.cpp
src/users.cpp

index 9feeb3c4d9845472dce8964ec78f791e8838ded4..aeec765312d90acbd92731891ebbcd99771c4627 100644 (file)
         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    #
index ec7fbd63a44c81e9e08d157f2809b41db3ac29bc..5f528c16b82b9ec91d09f4219c5799b387f1cd7b 100644 (file)
@@ -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
index 2140a37aea1ae9919f841bbcbd23ad39ff5de95d..793bfb4291761f22e048e6885e5719eccf887571 100644 (file)
@@ -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;
 
 
index 9748e9472761109e80f5acd412f782c2b2ed3e15..f4ec4e8bd4acd4b3e372b27068b443f688326be5 100644 (file)
@@ -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;
index 83dbe53b8827256fa9b8870abb400504076f1391..75ed4f35560cf6327d28f797dacd78c5d3a2fa9c 100644 (file)
@@ -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))
                {
index eaa25c1bea6142969f5c6881cc509320678a3387..e5fbc9abdac302e8e013456e8f504a052574304d 100644 (file)
@@ -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;
                                                }
index b3be3932b76a78757e1b8fecd6ba18581f599528..21314a6ee24d82ee518db540b8419f629d583275 100644 (file)
@@ -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());
                }
 
 };
index 882d4232ef9ad28dfa7fa8e5417526d2259863b3..8d1c46fb35717cddf8f3e99d95c3b4cb50526b19 100644 (file)
@@ -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;
index 3a5ea7462796321fa3b7252f5f05be4399f00042..78e6cfea33e10c441c87f695a6c4336e6484f79c 100644 (file)
@@ -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;
                                                }
                                        }
index 60796fd3f4a2b864c4c8ce324f3d700f4cc5bf9f..d764c76d784c37cd0a27cc8ff58bfb319ee48237 100644 (file)
@@ -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());
                }
 
 };
index e944d6229c13eb37ab5ba58fc3c4739c2ed4da94..9dc8aa5b72c8e0ba31a152f1a0cb9eeade722f14 100644 (file)
@@ -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;
                                }
                        }
index 4bc5d31a27d03d5826e25b40186f65129daef971..6e2243f0801f597ac014f6921d10fd683b18dd85 100644 (file)
@@ -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)
index dd288b82100059bd9515c504d361d99f0da14722..0b6c4430a8e6bb7aad5ff88de7a1aef3cd7dcf32 100644 (file)
@@ -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 */
 
index 119e9822019c087a1fc51b357fa6c96552951180..f729743815978e63cb6de6192f04b9765a44c781 100644 (file)
@@ -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);
 
index e8c83221ef757c0708420e8e90964cfa8a5da9a8..4002ad61e3f5a5545eeb9df5b4037515c801d61c 100644 (file)
@@ -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, ...);
index 86d13e96f285a383d04b947ece3c34d44724170b..062aed85516c2382a54871c989a27b28396f9a36 100644 (file)
@@ -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);
index 415ccbbad531948892d7c6348f4ef9ed71fb86bc..3bf1e67b13a7cf56c34cd3dd4e908e4ed0d6dc47 100644 (file)
 
 /* $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]);
                        }
index 0f0021ddf6f606479c177de8480e98e067527103..bea28f1e45638b7916e1df8c54ba85ece9b66df0 100644 (file)
 
 /* $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)
 {
 }
index 7964c98d96e1a0bf4d8783033c0808bd1b8a73d7..3f97255b33d04216e66d10132793d6309b934e8b 100644 (file)
@@ -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:
index 2fc847b0c05ace54f656966ce4a53e7d0609199e..76920d6e60bd9f4946cce7aaa5899344b72240e6 100644 (file)
@@ -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
index 3c7ee2cf00ed66d93d63717a40180f4ec3724dc0..fb4a81ba16a3ddf124a8eb4f5f17adaec3c93a88 100644 (file)
@@ -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);
index 3bbff7ea6def7aae99595811567ebdebec451996..c824b75edc20f49f996dbd825bd9bc21c819cdcf 100644 (file)
@@ -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;
index 155b0e83813280605beeed4e1f2e0922b229e813..4ee48550383e285482816286682a63973b9bc2fe 100644 (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(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);
index dd1ca179981c2a3e59cc97dbece77220667ff940..3ba09a7595a93a2628c5a1b1622ecce8a17cba0e 100644 (file)
@@ -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;
index f6ef92af336e40fcca24c991fecd0dfb40119275..8fdf336cc448f9d8b3d40a034887346ae59fb7bb 100644 (file)
@@ -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;