summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 15:06:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 15:06:32 +0000
commit89fc6ca9c66198fe54cce19d59279cd454fc1bd0 (patch)
tree5c0a6874cb3041a8efb0f8dda3d0089ba5c31944 /src/modules/m_spanningtree
parentce4dc653ce9acbb9b278b355e3b2f88998b26ac9 (diff)
Remote server PRIVMSG/NOTICE to nickname support
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9314 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/protocolinterface.cpp26
-rw-r--r--src/modules/m_spanningtree/protocolinterface.h2
2 files changed, 28 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp
index d10f7f981..d4ef88674 100644
--- a/src/modules/m_spanningtree/protocolinterface.cpp
+++ b/src/modules/m_spanningtree/protocolinterface.cpp
@@ -132,3 +132,29 @@ void SpanningTreeProtocolInterface::SendChannelNotice(Channel* target, char stat
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->GetSock();
+ 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->GetSock();
+ if (sock)
+ {
+ Sock->WriteLine(ServerInstance->Config->GetSID() + " NOTICE " + target->nick + " :"+text);
+ }
+ }
+}
+
diff --git a/src/modules/m_spanningtree/protocolinterface.h b/src/modules/m_spanningtree/protocolinterface.h
index 29d669da9..ab6270772 100644
--- a/src/modules/m_spanningtree/protocolinterface.h
+++ b/src/modules/m_spanningtree/protocolinterface.h
@@ -24,6 +24,8 @@ class SpanningTreeProtocolInterface : public ProtocolInterface
virtual void PushToClient(User* target, const std::string &rawline);
virtual void SendChannelPrivmsg(Channel* target, char status, const std::string &text);
virtual void SendChannelNotice(Channel* target, char status, const std::string &text);
+ virtual void SendUserPrivmsg(User* target, const std::string &text);
+ virtual void SendUserNotice(User* target, const std::string &text);
};
#endif