summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-21 18:12:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-21 18:12:08 +0000
commit29706dd23a99be2b2d8f0425b6600f546de91d49 (patch)
treeca8d3bc7b859bd185f231fa21f5badd9d2e8a15b /src/modules
parent7f28ef9777499c7e472550157d24ea986053ce08 (diff)
Allow for kick from a server origin to have a comma seperated list of nicknames to be kicked. Previously this was only supported by the user origin version
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10904 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index f35d3f6a5..ac8961068 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -445,13 +445,24 @@ bool TreeSocket::ProcessLine(std::string &line)
if (params.size() == 3)
{
TreeServer* pf = Utils->FindServer(prefix);
- User* user = this->ServerInstance->FindNick(params[1]);
- Channel* chan = this->ServerInstance->FindChan(params[0]);
- if (pf && user && chan)
+ if (pf)
{
- if (!chan->ServerKickUser(user, params[2].c_str(), false, pf->GetName().c_str()))
- /* Yikes, the channels gone! */
- delete chan;
+ irc::commasepstream nicks(params[1]);
+ std::string nick;
+ Channel* chan = this->ServerInstance->FindChan(params[0]);
+ if (chan)
+ {
+ while (nicks.GetToken(nick))
+ {
+ User* user = this->ServerInstance->FindNick(nick);
+ if (user)
+ {
+ if (!chan->ServerKickUser(user, params[2].c_str(), false, pf->GetName().c_str()))
+ /* Yikes, the channels gone! */
+ delete chan;
+ }
+ }
+ }
}
}