summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/svspart.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/svspart.cpp b/src/modules/m_spanningtree/svspart.cpp
index 639792be9..bcb73741b 100644
--- a/src/modules/m_spanningtree/svspart.cpp
+++ b/src/modules/m_spanningtree/svspart.cpp
@@ -35,6 +35,11 @@ bool TreeSocket::ServicePart(const std::string &prefix, std::deque<std::string>
if (params.size() < 2)
return true;
+ std::string reason = "Services forced part";
+
+ if (params.size() == 3)
+ reason = params[2];
+
User* u = this->Instance->FindNick(params[0]);
Channel* c = this->Instance->FindChan(params[1]);
@@ -42,7 +47,7 @@ bool TreeSocket::ServicePart(const std::string &prefix, std::deque<std::string>
{
/* only part if it's local, otherwise just pass it on! */
if (IS_LOCAL(u))
- if (!c->PartUser(u, "Services forced part"))
+ if (!c->PartUser(u, reason))
delete c;
Utils->DoOneToAllButSender(prefix,"SVSPART",params,prefix);
}