summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/channels.h2
-rw-r--r--src/channels.cpp7
-rw-r--r--src/modules/m_messageflood.cpp2
-rw-r--r--src/modules/m_sakick.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
6 files changed, 8 insertions, 9 deletions
diff --git a/include/channels.h b/include/channels.h
index 3bbcf0672..dfee69dc0 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -336,7 +336,7 @@ class CoreExport Channel : public Extensible
* @return The number of users left on the channel. If this is zero
* when the method returns, you MUST delete the Channel immediately!
*/
- long ServerKickUser(User* user, const char* reason, bool triggerevents, const char* servername = NULL);
+ long ServerKickUser(User* user, const char* reason, const char* servername = NULL);
/** Part a user from this channel with the given reason.
* If the reason field is NULL, no reason will be sent.
diff --git a/src/channels.cpp b/src/channels.cpp
index 99b118d0d..c1a5a59a3 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -592,7 +592,7 @@ long Channel::PartUser(User *user, std::string &reason)
return this->GetUserCounter();
}
-long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents, const char* servername)
+long Channel::ServerKickUser(User* user, const char* reason, const char* servername)
{
bool silent = false;
@@ -611,10 +611,7 @@ long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents,
if (servername == NULL || *ServerInstance->Config->HideWhoisServer)
servername = ServerInstance->Config->ServerName;
- if (triggerevents)
- {
- FOREACH_MOD(I_OnUserKick,OnUserKick(NULL, user, this, reason, silent));
- }
+ FOREACH_MOD(I_OnUserKick,OnUserKick(NULL, user, this, reason, silent));
UCListIter i = user->chans.find(this);
if (i != user->chans.end())
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index f2082da33..fb9d2bbc2 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -243,7 +243,7 @@ class ModuleMsgFlood : public Module
char kickmessage[MAXBUF];
snprintf(kickmessage, MAXBUF, "Channel flood triggered (limit is %d lines in %d secs)", f->lines, f->secs);
- if (!dest->ServerKickUser(user, kickmessage, true))
+ if (!dest->ServerKickUser(user, kickmessage))
{
delete dest;
}
diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp
index a9e7c3c0e..769aed7ce 100644
--- a/src/modules/m_sakick.cpp
+++ b/src/modules/m_sakick.cpp
@@ -57,7 +57,7 @@ class CommandSakick : public Command
*/
if (IS_LOCAL(dest))
{
- if (!channel->ServerKickUser(dest, reason, true, servername))
+ if (!channel->ServerKickUser(dest, reason, servername))
delete channel;
Channel* n = ServerInstance->FindChan(parameters[1]);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 01048e4d1..b38929ad0 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -677,6 +677,8 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
void ModuleSpanningTree::OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
{
+ if (loopCall)
+ return;
if ((source) && (IS_LOCAL(source)))
{
std::deque<std::string> params;
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 3e3fbd71e..b298ae369 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -451,7 +451,7 @@ bool TreeSocket::ProcessLine(std::string &line)
User* user = this->ServerInstance->FindNick(nick);
if (user)
{
- if (!chan->ServerKickUser(user, params[2].c_str(), false, pf->GetName().c_str()))
+ if (!chan->ServerKickUser(user, params[2].c_str(), pf->GetName().c_str()))
/* Yikes, the channels gone! */
delete chan;
}