From 0b070b52bc8e8ceb52388e45cea90f4add119c4f Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 11 Jul 2008 21:15:02 +0000 Subject: Convert API to use std::string, fixes my slight bug from earlier and looks tidier git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9956 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/svspart.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree/svspart.cpp') 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 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 { /* 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); } -- cgit v1.2.3