]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/protocolinterface.cpp
Allow SASL messages to be targeted at the services server
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / protocolinterface.cpp
index 2e3237efd89095662c8349e7930210fda4e893c8..7434400a00a61fae922e4d1af4d83f12f51a75d5 100644 (file)
@@ -26,9 +26,14 @@ void SpanningTreeProtocolInterface::GetServerList(ProtoServerList &sl)
        }
 }
 
-void SpanningTreeProtocolInterface::SendEncapsulatedData(parameterlist &encap)
+bool SpanningTreeProtocolInterface::SendEncapsulatedData(const parameterlist &encap)
 {
-       Utils->DoOneToMany(ServerInstance->Config->GetSID(), "ENCAP", encap);
+       if (encap[0].find('*') != std::string::npos)
+       {
+               Utils->DoOneToMany(ServerInstance->Config->GetSID(), "ENCAP", encap);
+               return true;
+       }
+       return Utils->DoOneToOne(ServerInstance->Config->GetSID(), "ENCAP", encap, encap[0]);
 }
 
 void SpanningTreeProtocolInterface::SendMetaData(Extensible* target, const std::string &key, const std::string &data)
@@ -94,14 +99,6 @@ void SpanningTreeProtocolInterface::SendMode(const std::string &target, const pa
        }
 }
 
-void SpanningTreeProtocolInterface::SendModeNotice(const std::string &modes, const std::string &text)
-{
-       parameterlist p;
-       p.push_back(modes);
-       p.push_back(":" + text);
-       Utils->DoOneToMany(ServerInstance->Config->GetSID(), "MODENOTICE", p);
-}
-
 void SpanningTreeProtocolInterface::SendSNONotice(const std::string &snomask, const std::string &text)
 {
        parameterlist p;