rendered paste body public static final String SAY_FILTER_FILE= "./config/sayfilter.txt";
...
USE_SAY_FILTER = Boolean.parseBoolean(optionsSettings.getProperty("UseSayFilter", "false"));
if(USE_SAY_FILTER){
try{
LineNumberReader lnr = null;
File say_filter = new File(SAY_FILTER_FILE);
lnr = new LineNumberReader(new BufferedReader(new FileReader(say_filter)));
String line = null;
while ((line = lnr.readLine()) != null){
if (line.trim().length() == 0 || line.startsWith("#"))
{
continue;
}
FILTER_LIST.add(line);
}
}catch (FileNotFoundException e)
{
_log.warning("sayfilter.txt is missing in config folder");
}
catch (Exception e)
{
_log.warning("error loading say filter: " + e);
}
_log.config("Say Filter: Loaded " + FILTER_LIST.size() + " words");
}