@Override
    public void execute(CommandSender sender, String[] args) {
        if (args.length < 2) {
            sender.sendMessage(new TextComponent(ChatColor.RED + "Usage: /mode <channel> <mode ...>"));
            return;
        }
        if (!IRC.sock.isConnected()) {
            sender.sendMessage(new TextComponent(ChatColor.RED + "The proxy is not connected to IRC."));
            return;
        }
        ArrayList<String> list = new ArrayList<String>(Arrays.asList(args));
        list.remove(0);
        StringBuilder msg = new StringBuilder();
        for (String a : list) msg.append(a).append(" ");
        if (!Util.giveChannelModes(args[0], msg.toString())) {
            sender.sendMessage(new TextComponent(ChatColor.RED + "One or more of the modes were not recognised."));
            return;
        }
        sender.sendMessage(new TextComponent(ChatColor.GRAY + "Modes set."));
    }