summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cycle.cpp2
-rw-r--r--src/modules/m_remove.cpp2
-rw-r--r--src/modules/m_sapart.cpp4
-rw-r--r--src/modules/m_spanningtree/svspart.cpp7
4 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 037e570f6..5b562631d 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -59,7 +59,7 @@ class CommandCycle : public Command
}
/* XXX in the future, this may move to a static Channel method (the delete.) -- w00t */
- if (!channel->PartUser(user, reason.c_str()))
+ if (!channel->PartUser(user, reason))
delete channel;
Channel::JoinUser(ServerInstance, user, parameters[0].c_str(), true, "", false, ServerInstance->Time());
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 4dfa0bfb5..d35f1f8dd 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -180,7 +180,7 @@ class RemoveBase
channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str());
target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str());
- if (!channel->PartUser(target, reason.c_str()))
+ if (!channel->PartUser(target, reason))
delete channel;
}
else
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 1baabc463..f01cb1564 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -31,7 +31,7 @@ class CommandSapart : public Command
{
User* dest = ServerInstance->FindNick(parameters[0]);
Channel* channel = ServerInstance->FindChan(parameters[1]);
- std::string reason;
+ std::string reason = "";
if (dest && channel)
{
@@ -50,7 +50,7 @@ class CommandSapart : public Command
*/
if (IS_LOCAL(dest))
{
- if (!channel->PartUser(dest, reason.empty() ? NULL : reason.c_str()))
+ if (!channel->PartUser(dest, reason))
delete channel;
Channel* n = ServerInstance->FindChan(parameters[1]);
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);
}