summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/server.cpp2
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp23
-rw-r--r--src/modules/m_spanningtree/treeserver.h5
3 files changed, 5 insertions, 25 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp
index a12118861..0d9bd0a9e 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -80,7 +80,6 @@ bool TreeSocket::RemoteServer(const std::string &prefix, std::deque<std::string>
params[4] = ":" + params[4];
Utils->DoOneToAllButSender(prefix,"SERVER",params,prefix);
this->ServerInstance->SNO->WriteToSnoMask('L', "Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")");
- Node->bursting = true;
return true;
}
@@ -172,7 +171,6 @@ bool TreeSocket::Outbound_Reply_Server(std::deque<std::string> &params)
params[1] = "*";
Utils->DoOneToAllButSender(ServerInstance->Config->GetSID(),"SERVER",params,sname);
- Node->bursting = true;
this->DoBurst(Node);
return true;
}
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 455b49c84..ff16b6d60 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -23,20 +23,6 @@
/* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h */
-TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, const std::string &id) : ServerInstance(Instance), Utils(Util)
-{
- Parent = NULL;
- bursting = false;
- ServerName.clear();
- ServerDesc.clear();
- VersionString.clear();
- ServerUserCount = ServerOperCount = 0;
- StartBurst = rtt = 0;
- Warned = Hidden = false;
- VersionString = ServerInstance->GetVersionString();
- SetID(id);
-}
-
/** We use this constructor only to create the 'root' item, Utils->TreeRoot, which
* represents our own server. Therefore, it has no route, no parent, and
* no socket associated with it. Its version string is our own local version.
@@ -64,13 +50,12 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::string Name, std::string Desc, const std::string &id, TreeServer* Above, TreeSocket* Sock, bool Hide)
: ServerInstance(Instance), Parent(Above), ServerName(Name.c_str()), ServerDesc(Desc), Socket(Sock), Utils(Util), Hidden(Hide)
{
- bursting = false;
+ bursting = true;
VersionString.clear();
ServerUserCount = ServerOperCount = 0;
this->SetNextPingTime(ServerInstance->Time() + Utils->PingFreq);
- this->SetPingFlag();
Warned = false;
- StartBurst = rtt = 0;
+ rtt = 0;
timeval t;
gettimeofday(&t, NULL);
@@ -157,7 +142,9 @@ void TreeServer::FinishBurst()
gettimeofday(&t, NULL);
long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
unsigned long bursttime = ts - this->StartBurst;
- ServerInstance->SNO->WriteToSnoMask('l', "Received end of netburst from \2%s\2 (burst time: %lu %s)", ServerName.c_str(), (bursttime > 1000 ? bursttime / 1000 : bursttime), (bursttime > 1000 ? "secs" : "msecs"));
+ ServerInstance->SNO->WriteToSnoMask('l', "Received end of netburst from \2%s\2 (burst time: %lu %s)",
+ ServerName.c_str(), (bursttime > 10000 ? bursttime / 1000 : bursttime), (bursttime > 10000 ? "secs" : "msecs"));
+ SetPingFlag();
Event rmode((char*)ServerName.c_str(), (Module*)Utils->Creator, "new_server");
rmode.Send(ServerInstance);
}
diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h
index ff7faff93..f39778eb0 100644
--- a/src/modules/m_spanningtree/treeserver.h
+++ b/src/modules/m_spanningtree/treeserver.h
@@ -56,11 +56,6 @@ class TreeServer : public classbase
bool Warned; /* True if we've warned opers about high latency on this server */
bool bursting; /* whether or not this server is bursting */
- /** We don't use this constructor. Its a dummy, and won't cause any insertion
- * of the TreeServer into the hash_map. See below for the two we DO use.
- */
- TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, const std::string &id);
-
/** We use this constructor only to create the 'root' item, Utils->TreeRoot, which
* represents our own server. Therefore, it has no route, no parent, and
* no socket associated with it. Its version string is our own local version.