From a459f5b0e3e2ed219665feb7d3bc5d00d1643027 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 1 Jul 2012 22:07:47 +0200 Subject: m_spanningtree Specify the uuid of the remote user when sending server NOTICE/PRIVMSG to him --- src/modules/m_spanningtree/protocolinterface.cpp | 26 ++++++++---------------- 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp index 9c489fcb4..3ab5dae9d 100644 --- a/src/modules/m_spanningtree/protocolinterface.cpp +++ b/src/modules/m_spanningtree/protocolinterface.cpp @@ -164,26 +164,16 @@ void SpanningTreeProtocolInterface::SendChannelNotice(Channel* target, char stat 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); - } - } + parameterlist p; + p.push_back(target->uuid); + p.push_back(":" + text); + Utils->DoOneToOne(ServerInstance->Config->GetSID(), "PRIVMSG", p, target->server); } 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); - } - } + parameterlist p; + p.push_back(target->uuid); + p.push_back(":" + text); + Utils->DoOneToOne(ServerInstance->Config->GetSID(), "NOTICE", p, target->server); } -- cgit v1.2.3