From 5a4d9ac6957530438ca3eaa21436c1fdf3bf463e Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 12 Jun 2008 16:32:02 +0000 Subject: Merge in patch from bug #557, thanks for the feature jackmcbarn git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9890 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_sapart.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 05fe5ffdc..1baabc463 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -35,10 +35,8 @@ class CommandSapart : public Command if (dest && channel) { - if (parameters.size() == 3) + if (parameters.size() > 2) reason = parameters[2]; - else - reason = dest->nick; if (ServerInstance->ULine(dest->server)) { @@ -52,8 +50,9 @@ class CommandSapart : public Command */ if (IS_LOCAL(dest)) { - if (!channel->PartUser(dest, reason.c_str())) + if (!channel->PartUser(dest, reason.empty() ? NULL : reason.c_str())) delete channel; + Channel* n = ServerInstance->FindChan(parameters[1]); if (!n) { -- cgit v1.2.3