<commit_before>/*
 * 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.eventListeners;

import com.techcavern.wavetact.utils.DatabaseUtils;
import com.techcavern.wavetact.utils.IRCUtils;
import org.jooq.Record;
import org.pircbotx.hooks.ListenerAdapter;
import org.pircbotx.hooks.events.PrivateMessageEvent;

import static com.techcavern.wavetactdb.Tables.NETWORKPROPERTY;

/**
 * @author jztech101
 */
public class PrivMsgLogger extends ListenerAdapter {

    @Override
    public void onPrivateMessage(PrivateMessageEvent event) throws Exception {
        Record pmlog = DatabaseUtils.getNetworkProperty(IRCUtils.getNetworkNameByNetwork(event.getBot()), "pmlog");
        if (pmlog != null && IRCUtils.getChannelbyName(event.getBot(), pmlog.getValue(NETWORKPROPERTY.VALUE)) != null)
            IRCUtils.sendMessage(null, event.getBot(), IRCUtils.getChannelbyName(event.getBot(), pmlog.getValue(NETWORKPROPERTY.VALUE)), "[" + event.getUser().getNick() + "] " + event.getMessage(), "");
    }
}





<commit_msg>No more pings in staff channel (Resolves #161)<commit_after>/*
 * 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.eventListeners;

import com.techcavern.wavetact.utils.DatabaseUtils;
import com.techcavern.wavetact.utils.GeneralUtils;
import com.techcavern.wavetact.utils.IRCUtils;
import org.jooq.Record;
import org.pircbotx.hooks.ListenerAdapter;
import org.pircbotx.hooks.events.PrivateMessageEvent;

import static com.techcavern.wavetactdb.Tables.NETWORKPROPERTY;

/**
 * @author jztech101
 */
public class PrivMsgLogger extends ListenerAdapter {

    @Override
    public void onPrivateMessage(PrivateMessageEvent event) throws Exception {
        Record pmlog = DatabaseUtils.getNetworkProperty(IRCUtils.getNetworkNameByNetwork(event.getBot()), "pmlog");
        if (pmlog != null && IRCUtils.getChannelbyName(event.getBot(), pmlog.getValue(NETWORKPROPERTY.VALUE)) != null)
            IRCUtils.sendMessage(null, event.getBot(), IRCUtils.getChannelbyName(event.getBot(), pmlog.getValue(NETWORKPROPERTY.VALUE)), "[" + GeneralUtils.replaceVowelsWithAccents(event.getUser().getNick()) + "] " + event.getMessage(), "");
    }
}






{'fraction_non_alphanumeric': 0.11371914204775395, 'fraction_numerical': 0.003642250101173614, 'mean_word_length': 5.073710073710074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5147425', 'n_tokens_mistral': 762, 'n_tokens_neox': 760, 'n_words': 153}