diff options
author | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-16 21:45:09 -0500 |
---|---|---|
committer | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-16 21:47:23 -0500 |
commit | 49223cfe12ecd9071123f724e615e63841f2421d (patch) | |
tree | a2db88ccbfedb6bc5c8d21b832a03d129aa8913e /src/modules | |
parent | 2112152e3369be27ae6ecb1a14205e64b8f85999 (diff) |
Fix crash when a remote server has the same name as we do
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/server.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 82777845e..6e3bcafaa 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -223,8 +223,9 @@ bool TreeSocket::Inbound_Server(parameterlist ¶ms) TreeServer* CheckDupe = Utils->FindServer(sname); if (CheckDupe) { - this->SendError("Server "+sname+" already exists on server "+CheckDupe->GetParent()->GetName()+"!"); - ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, already exists on server "+CheckDupe->GetParent()->GetName()); + std::string pname = CheckDupe->GetParent() ? CheckDupe->GetParent()->GetName() : "<ourself>"; + SendError("Server "+sname+" already exists on server "+pname+"!"); + ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, already exists on server "+pname); return false; } |