+ itemList = Req->argv[1];
+ while (*itemList) {
+ if (*itemList == ',') {
+ *itemList = '\0';
+ nickCount++;
+ }
+ itemList++;
+ }
+
+ if (Client_Type(Client) == CLIENT_SERVER)
+ from = Client_Search(Req->prefix);
+ else
+ from = Client;
+
+ if (!from)
+ return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
+ Client_ID(Client), Req->prefix);
+
+ reason = Req->argc == 3 ? Req->argv[2] : Client_ID(from);
+ currentNick = Req->argv[1];
+ currentChannel = Req->argv[0];
+ if (channelCount == 1) {
+ while (nickCount > 0) {
+ if (!try_kick(Client, from, currentNick,
+ currentChannel, reason))
+ return false;
+
+ while (*currentNick)
+ currentNick++;
+
+ currentNick++;
+ nickCount--;
+ }
+ } else if (channelCount == nickCount) {
+ while (nickCount > 0) {
+ if (!try_kick(Client, from, currentNick,
+ currentChannel, reason))
+ return false;
+
+ while (*currentNick)
+ currentNick++;
+
+ while (*currentChannel)
+ currentChannel++;
+
+ currentNick++;
+ currentChannel++;
+ nickCount--;
+ }
+ } else {
+ return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
+ Client_ID(Client), Req->command);
+ }
+ return true;
+} /* IRC_KICK */