]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/protocolinterface.cpp
See this brain
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / protocolinterface.cpp
index d10f7f98143ec1c594747534eca24171f8031561..f204c15edfa7a9508f024adba287d0b404355f1e 100644 (file)
@@ -124,11 +124,37 @@ void SpanningTreeProtocolInterface::SendChannel(Channel* target, char status, co
 
 void SpanningTreeProtocolInterface::SendChannelPrivmsg(Channel* target, char status, const std::string &text)
 {
-       SendChannel(target, status, ServerInstance->Config->GetSID()+" PRIVMSG "+target->name+" :"+text);
+       SendChannel(target, status, ":" + ServerInstance->Config->GetSID()+" PRIVMSG "+target->name+" :"+text);
 }
 
 void SpanningTreeProtocolInterface::SendChannelNotice(Channel* target, char status, const std::string &text)
 {
-       SendChannel(target, status, ServerInstance->Config->GetSID()+" NOTICE "+target->name+" :"+text);
+       SendChannel(target, status, ":" + ServerInstance->Config->GetSID()+" NOTICE "+target->name+" :"+text);
+}
+
+void SpanningTreeProtocolInterface::SendUserPrivmsg(User* target, const std::string &text)
+{
+       TreeServer* serv = Utils->FindServer(target->server);
+       if (serv)
+       {
+               TreeSocket* sock = serv->GetSocket();
+               if (sock)
+               {
+                       sock->WriteLine(":" + ServerInstance->Config->GetSID() + " PRIVMSG " + target->nick + " :"+text);
+               }
+       }
+}
+
+void SpanningTreeProtocolInterface::SendUserNotice(User* target, const std::string &text)
+{
+       TreeServer* serv = Utils->FindServer(target->server);
+       if (serv)
+       {
+               TreeSocket* sock = serv->GetSocket();
+               if (sock)
+               {
+                       sock->WriteLine(":" + ServerInstance->Config->GetSID() + " NOTICE " + target->nick + " :"+text);
+               }
+       }
 }