diff options
-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 a04454f51..05441da0c 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -137,8 +137,9 @@ bool TreeSocket::Outbound_Reply_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; } CheckDupe = Utils->FindServer(sid); |