aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/protocolinterface.cpp
diff options
context:
space:
mode:
authorGravatar genius30002016-11-21 11:44:18 -0700
committerGravatar Attila Molnar2016-12-07 17:42:33 +0100
commitd494c188245e1c80c9556a6a7efafd6fe8f4f6de (patch)
treea14f45f6ea3c9dc8bd9aa5b16b891daee10e71ca /src/modules/m_spanningtree/protocolinterface.cpp
parentFix users receiving a QUIT with themselves as source when host cycling in cer... (diff)
downloadinspircd++-d494c188245e1c80c9556a6a7efafd6fe8f4f6de.tar.gz
inspircd++-d494c188245e1c80c9556a6a7efafd6fe8f4f6de.tar.bz2
inspircd++-d494c188245e1c80c9556a6a7efafd6fe8f4f6de.zip
Fix SpanningTreeProtocolInterface::SendChannelPrivmsg() and SendChannelNotice() sending statusmsgs to whole channel
Diffstat (limited to 'src/modules/m_spanningtree/protocolinterface.cpp')
-rw-r--r--src/modules/m_spanningtree/protocolinterface.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp
index 3ab5dae9d..ca4147fea 100644
--- a/src/modules/m_spanningtree/protocolinterface.cpp
+++ b/src/modules/m_spanningtree/protocolinterface.cpp
@@ -137,9 +137,6 @@ void SpanningTreeProtocolInterface::PushToClient(User* target, const std::string
void SpanningTreeProtocolInterface::SendChannel(Channel* target, char status, const std::string &text)
{
- std::string cname = target->name;
- if (status)
- cname = status + cname;
TreeServerList list;
CUList exempt_list;
Utils->GetListOfServersForChannel(target,list,status,exempt_list);
@@ -154,12 +151,20 @@ 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);
+ std::string cname = target->name;
+ if (status)
+ cname.insert(0, 1, status);
+
+ SendChannel(target, status, ":" + ServerInstance->Config->GetSID()+" PRIVMSG "+cname+" :"+text);
}
void SpanningTreeProtocolInterface::SendChannelNotice(Channel* target, char status, const std::string &text)
{
- SendChannel(target, status, ":" + ServerInstance->Config->GetSID()+" NOTICE "+target->name+" :"+text);
+ std::string cname = target->name;
+ if (status)
+ cname.insert(0, 1, status);
+
+ SendChannel(target, status, ":" + ServerInstance->Config->GetSID()+" NOTICE "+cname+" :"+text);
}
void SpanningTreeProtocolInterface::SendUserPrivmsg(User* target, const std::string &text)