summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-13 05:28:00 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-13 05:28:00 +0000
commita889336d194abc7df7a98102e3d0e56f0e125edc (patch)
treec41cd85106841964c55782a74bc973d3d0fe94d4 /src
parentddc77036f61620d15faad818b228a147dbd88852 (diff)
Make the previous patches actually work
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11378 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp6
-rw-r--r--src/modules/m_spanningtree/utils.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index b8eced5f4..3d24c7cd2 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -609,7 +609,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
}
/* set up fake client again this time with the correct uid */
- this->FakeClient = new FakeUser(this);
+ this->FakeClient = new FakeUser(this, "!");
// Get XLine to do it's thing.
this->XLines->CheckELines();
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 9f99a7416..68b5a7840 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -299,8 +299,10 @@ bool TreeSocket::ProcessLine(std::string &line)
TreeServer *ServerSource = Utils->FindServer(prefix);
if (ServerSource)
{
- Utils->ServerUser->server = ServerSource->GetName().c_str();
- Utils->ServerUser->uid = ServerSource->GetID();
+ // ServerSource->GetName().c_str() may become invalid before it is used
+ Utils->ServerUser->nick = ServerSource->GetName().c_str();
+ Utils->ServerUser->server = Utils->ServerUser->nick.c_str();
+ Utils->ServerUser->uuid = ServerSource->GetID();
}
/* Find the link we just got this from so we don't bounce it back incorrectly */
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 23dd6084e..4ea5513ed 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -154,7 +154,7 @@ SpanningTreeUtilities::SpanningTreeUtilities(InspIRCd* Instance, ModuleSpanningT
ServerInstance->Logs->Log("m_spanningtree",DEBUG,"***** Using SID for hash: %s *****", ServerInstance->Config->GetSID().c_str());
this->TreeRoot = new TreeServer(this, ServerInstance, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc, ServerInstance->Config->GetSID());
- this->ServerUser = new FakeUser(ServerInstance);
+ this->ServerUser = new FakeUser(ServerInstance, TreeRoot->GetID());
this->ReadConfiguration(true);
}