diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-11 21:15:02 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-11 21:15:02 +0000 |
commit | 0b070b52bc8e8ceb52388e45cea90f4add119c4f (patch) | |
tree | c8934030ba064a432d4807fbe93b002ea0210d25 /src/modules/m_spanningtree | |
parent | f8d9c513174926eae5b0545c56c310c90f295132 (diff) |
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
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/svspart.cpp | 7 |
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); } |