]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/postcommand.cpp
Remote user messaging fixes
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / postcommand.cpp
index 0988fe0991b3413be59b14c3f82c5bd9bbbf9ee4..d2cea154a2c00e792ae1dd8d082adca235e87361 100644 (file)
@@ -54,7 +54,14 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::ve
        }
        else if (routing.type == ROUTE_TYPE_OPT_UCAST)
        {
-               params.push_back(routing.serverdest);
+               TreeServer* sdest = Utils->FindServer(routing.serverdest);
+               if (!sdest)
+               {
+                       ServerInstance->Logs->Log("m_spanningtree",ERROR,"Trying to route ENCAP to nonexistant server %s",
+                               routing.serverdest.c_str());
+                       return;
+               }
+               params.push_back(sdest->GetID());
                params.push_back(command);
                sent_cmd = "ENCAP";
        }