From 29706dd23a99be2b2d8f0425b6600f546de91d49 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 21 Dec 2008 18:12:08 +0000 Subject: 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 --- src/modules/m_spanningtree/treesocket2.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/modules') 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; + } + } + } } } -- cgit v1.2.3