diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-12 16:32:02 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-12 16:32:02 +0000 |
commit | 5a4d9ac6957530438ca3eaa21436c1fdf3bf463e (patch) | |
tree | f4f64a92449cf930fb7417a9adeab1bd350d9ba3 /src | |
parent | e19f84d7cc5f6eaad2e34fd370060900f76a170c (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_sapart.cpp | 7 |
1 files 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) { |