]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add XLine::SetCreateTime that removes gline_set_creation_time and friends
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 31 Oct 2007 22:15:03 +0000 (22:15 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 31 Oct 2007 22:15:03 +0000 (22:15 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8449 e03df62e-2008-0410-955e-edbf42e46eb7

include/xline.h
src/modules/m_spanningtree/treesocket2.cpp

index e395c8fbae399bf43a6106de5ee4843f22af017f..c6d85187afebbde0339962722c5a05d9b255f3e3 100644 (file)
@@ -62,6 +62,12 @@ class CoreExport XLine : public classbase
                free(source);
        }
 
+       virtual void SetCreateTime(time_t created)
+       {
+               set_time = created;
+               expiry = created + duration;
+       }
+
        /** Returns true whether or not the given user is covered by this line.
         */
        virtual bool Matches(User *u) = 0;
index b214e01add5b5510a02e7c73c220d174d60b0c0f..e9316fccd18719fb89340544308450fdbd6b75fc 100644 (file)
@@ -529,9 +529,9 @@ bool TreeSocket::AddLine(const std::string &prefix, std::deque<std::string> &par
                return false;
 
        XLine* xl = xlf->Generate(Instance->Time(), atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
+       xl->SetCreateTime(atoi(params[3]).c_str());
        if (Instance->XLines->AddLine(xl,NULL))
        {
-               /*Instance->XLines->zline_set_creation_time(params[1].c_str(), atoi(params[3].c_str()));*/
                if (xl->expiry)
                {
                        this->Instance->SNO->WriteToSnoMask('x',"%s Added %cLINE on %s to expire on %s (%s).",prefix.c_str(),*(params[0].c_str()),params[1].c_str(),Instance->TimeString(xl->expiry).c_str(),params[5].c_str());