/* * 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 Invite extends IRCCommand { public Invite() { super(GeneralUtils.toArray("invite inv"), 7, "invite [user]", "Invites a user to the channel", true); } @Override public void onCommand(String command, User user, PircBotX network, String prefix, Channel channel, boolean isPrivate, int userPermLevel, String... args) throws Exception { channel.send().invite(args[0]); IRCUtils.sendAction(user, network, channel, "invites " + args[0] + " per " + user.getNick(), prefix); } }