/** @param event */ @Override public void onMode(ModeEvent event) { Channel channel = event.getChannel(); String mode = event.getMode(); User user = event.getUser(); if (!ircBot.isValidChannel(channel.getName())) { ircBot.broadcastIRCMode(user.getNick(), mode, channel.getName()); } }
@Override public void onMode(ModeEvent event) { if (Config.LOGGED_CHANS.contains(event.getChannel().getName())) { log( event.getChannel().getName(), String.format( "%s %s sets mode %s on %s", Utils.getTime(), event.getUser().getNick(), event.getMode(), event.getChannel().getName())); } if (Bot.relay.containsKey(event.getChannel().getName().toLowerCase())) { if (!event.getMode().contains("+b") && !event.getMode().contains("-b")) { event .getBot() .sendMessage( Bot.relay.get(event.getChannel().getName().toLowerCase()), String.format( "[%s] %s sets mode %s on %s", event.getChannel().getName(), event.getUser().getNick(), event.getMode(), event.getChannel().getName())); } } }