diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-04-23 15:10:33 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-04-23 15:10:33 +0200 |
commit | f6aea98dc5c3d9e2e54cde5aaf3198eee3c1ebfb (patch) | |
tree | 48c8552e6c09dc2f4a650fd5a89ecb861d77204b /src | |
parent | b742311a7039655c63c4d08902b43cebdeeb8d33 (diff) |
m_spanningtree Fix crash when connecting to a remote server that has the same name as we do and also there is a link block with our server name and their password
See 49223cfe12ecd9071123f724e615e63841f2421d
Diffstat (limited to 'src')
-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); |