diff options
-rw-r--r-- | include/xline.h | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/xline.h b/include/xline.h index e395c8fba..c6d85187a 100644 --- a/include/xline.h +++ b/include/xline.h @@ -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; diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index b214e01ad..e9316fccd 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -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()); |