From a215177f3179f8a47a7d5a669467334c5b8e40ec Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 27 Aug 2008 19:47:33 +0000 Subject: [PATCH] Don't force-finish a burst on a timer, instead, set bursted if a PONG is recieved while still bursting (obviously wrong). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10326 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 10 ---------- src/modules/m_spanningtree/treesocket2.cpp | 6 ++++++ src/users.cpp | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index bfce80589..a6b0f3a40 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -192,16 +192,6 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) { TreeServer *s = i->second; - if (s->bursting) - { - unsigned long bursttime = ts - s->StartBurst; - if (bursttime > 60000) // A minute - { - ServerInstance->SNO->WriteToSnoMask('l',"Server \002%s\002 has not finished burst, forcing end of burst.", s->GetName().c_str()); - s->FinishBurst(); - } - } - // Now do PING checks on all servers TreeServer *mts = Utils->BestRouteTo(s->GetID()); diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 912959b4e..f2679518e 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -399,6 +399,12 @@ bool TreeSocket::ProcessLine(std::string &line) } else if (command == "PONG") { + TreeServer *s = Utils->FindServer(prefix); + if (s && s->bursting) + { + Instance->SNO->WriteToSnoMask('l',"Server \002%s\002 has not finished burst, forcing end of burst (send ENDBURST!)", prefix.c_str()); + s->FinishBurst(); + } return this->LocalPong(prefix,params); } else if (command == "VERSION") diff --git a/src/users.cpp b/src/users.cpp index c6a607a9f..adf32b752 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -702,7 +702,7 @@ void User::Oper(const std::string &opertype, const std::string &opername) char* savept2; if (this->IsModeSet('o')) - this->Deoper(); + this->UnOper(); this->modes[UM_OPERATOR] = 1; this->WriteServ("MODE %s :+o", this->nick.c_str()); -- 2.39.5