summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 00:50:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 00:50:54 +0000
commitb8383dcc9524ca832de7daf56f44fe54b19e5bdc (patch)
treed885d65bfb0c4c6948ad5a5de69bef4da8e438bb /src
parentfd6ee21f2f55875984884a8413d61012e066029f (diff)
And fix a bug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4864 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 1238261d4..4ff327598 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -231,7 +231,7 @@ class TreeServer : public classbase
* 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.
*/
- TreeServer(std::string Name, std::string Desc) : ServerName(Name.c_str()), ServerDesc(Desc)
+ TreeServer(InspIRCd* Instance, std::string Name, std::string Desc) : ServerInstance(Instance), ServerName(Name.c_str()), ServerDesc(Desc)
{
Parent = NULL;
VersionString = "";
@@ -246,7 +246,8 @@ class TreeServer : public classbase
* This constructor initializes the server's Route and Parent, and sets up
* its ping counters so that it will be pinged one minute from now.
*/
- TreeServer(std::string Name, std::string Desc, TreeServer* Above, TreeSocket* Sock) : Parent(Above), ServerName(Name.c_str()), ServerDesc(Desc), Socket(Sock)
+ TreeServer(InspIRCd* Instance, std::string Name, std::string Desc, TreeServer* Above, TreeSocket* Sock)
+ : ServerInstance(Instance), Parent(Above), ServerName(Name.c_str()), ServerDesc(Desc), Socket(Sock)
{
VersionString = "";
UserCount = OperCount = 0;
@@ -2436,7 +2437,7 @@ class TreeSocket : public InspSocket
this->Instance->WriteOpers("*** Server connection from \2"+servername+"\2 denied, already exists");
return false;
}
- TreeServer* Node = new TreeServer(servername,description,ParentOfThis,NULL);
+ TreeServer* Node = new TreeServer(this->Instance,servername,description,ParentOfThis,NULL);
ParentOfThis->AddChild(Node);
params[3] = ":" + params[3];
DoOneToAllButSender(prefix,"SERVER",params,prefix);
@@ -2480,7 +2481,7 @@ class TreeSocket : public InspSocket
// we should add the details of this server now
// to the servers tree, as a child of the root
// node.
- TreeServer* Node = new TreeServer(sname,description,TreeRoot,this);
+ TreeServer* Node = new TreeServer(this->Instance,sname,description,TreeRoot,this);
TreeRoot->AddChild(Node);
params[3] = ":" + params[3];
DoOneToAllButSender(TreeRoot->GetName(),"SERVER",params,sname);
@@ -2675,7 +2676,7 @@ class TreeSocket : public InspSocket
}
}
this->LinkState = CONNECTED;
- Node = new TreeServer(InboundServerName,InboundDescription,TreeRoot,this);
+ Node = new TreeServer(this->Instance,InboundServerName,InboundDescription,TreeRoot,this);
TreeRoot->AddChild(Node);
params.clear();
params.push_back(InboundServerName);
@@ -3420,10 +3421,10 @@ class ModuleSpanningTree : public Module
Bindings.clear();
- ::ServerInstance = this->ServerInstance;
+ ::ServerInstance = Me;
// Create the root of the tree
- TreeRoot = new TreeServer(ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc);
+ TreeRoot = new TreeServer(ServerInstance, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc);
ReadConfiguration(true);