/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techcavern.wavetact.ircCommands.chanhalfop;

import com.techcavern.wavetact.annot.IRCCMD;
import com.techcavern.wavetact.objects.IRCCommand;
import com.techcavern.wavetact.utils.GeneralUtils;
import com.techcavern.wavetact.utils.IRCUtils;
import org.pircbotx.Channel;
import org.pircbotx.PircBotX;
import org.pircbotx.User;

/**
 * @author jztech101
 */
@IRCCMD

public class Kick extends IRCCommand {

    public Kick() {
        super(GeneralUtils.toArray("kick"), 7, "kick [user] (message)", "Kicks a user with specified message or none", true);
    }

    @Override
    public void onCommand(String command, User user, PircBotX network, String prefix, Channel channel, boolean isPrivate, int userPermLevel, String... args) throws Exception {
        String message = "[" + user.getNick() + "]";
        if (args.length > 1) {
            message += " " + GeneralUtils.buildMessage(1, args.length, args);
        }
        if (args[0].equalsIgnoreCase(network.getNick()))
            IRCUtils.sendKick(network.getUserBot(), user, network, channel, message);
        else
            IRCUtils.sendKick(network.getUserBot(), IRCUtils.getUserByNick(network, args[0]), network, channel, message);
    }

}

@@ -425,24 +425,69 @@
 s.IRCUtils;%0A
+import org.apache.commons.lang3.StringUtils;%0A
 import org.p
@@ -560,16 +560,40 @@
 .User;%0A%0A
+import java.util.List;%0A%0A
 /**%0A * @
@@ -1197,16 +1197,410 @@
 args%5B0%5D.
+contains(%22,%22))%7B%0A            String%5B%5D nicks = StringUtils.split(args%5B0%5D, %22,%22);%0A            for(String nick:nicks)%7B%0A                kick(network, user, channel, message, nick);%0A            %7D%0A        %7Delse%7B%0A            kick(network, user, channel, message, args%5B0%5D);%0A        %7D%0A    %7D%0A    static void kick(PircBotX network, User user, Channel channel, String message, String nick)%7B%0A        if (nick.
 equalsIg
@@ -1811,23 +1811,20 @@
 etwork, 
-args%5B0%5D
+nick
 ), netwo
@@ -1855,8 +1855,14 @@
    %7D
+%0A    %7D
 %0A%0A
-%7D
+%0A
 %0A

Add Multi-User Kicking Support