<commit_before>var request = require("request");
var websocket = require("websocket").client;
var fs = require("fs");
var util = require("util");

var username = "USERNAME";
var password = "PASSWORD";
var log_chat = false;
var room;
var modhash;

var default_config = '{"username":"undefined","password":"<PASSWORD>","log_chat":false}';

var options;
try {
    fs.accessSync("config.json", fs.F_OK);
    fs.readFile('config.json', 'utf8', function (err,data) {
      if (err) {
        return console.log(err);
      }
      options = JSON.parse(data);
    });
} catch (e) {
    fs.writeFile("config.json", default_config, function(err) {
        if(err) {
            return console.log(err);
        }
    
        console.log("The file was saved!");
    }); 
  console.log("Created initial config file at config.json, please edit it!")
  process.exit();
}

if (options["username"] != "undefined") {
  if (options["password"] != "<PASSWORD>") {
    username = options["username"];
    password = options["password"];
  }
}

log_chat = options["log_chat"]

var insults = [
"USER looks like a pinecone!",
"USER smells bad!",
"USER looks like a snowman!",
"USER probably isn't even a communist.",
"I don't like USER.",
"No one likes USER.",
"No one would miss USER.",
"USER is the reason cancer exists",
"Cancer would be a preferable alternative to USER.",
"I'd rather drink bleach than even see USER.",
"Does anyone else think USER should die?",<commit_msg>Fixed main.js for real.<commit_after>var request = require("request");
var websocket = require("websocket").client;
var fs = require("fs");
var util = require("util");

var username = "USERNAME";
var password = "PASSWORD";
var log_chat = false;
var room;
var modhash;

var default_config = '{"username":"undefined","password":"<PASSWORD>","log_chat":false}';

var options;
try {
    fs.accessSync("config.json", fs.F_OK);
    fs.readFile('config.json', 'utf8', function (err,data) {
      if (err) {
        return console.log(err);
      }
      options = JSON.parse(data);
    });
} catch (e) {
    fs.writeFile("config.json", default_config, function(err) {
        if(err) {
            return console.log(err);
        }
    
        console.log("The file was saved!");
        console.log("Created initial config file at config.json, please edit it!")
        process.exit();
    }); 
}

if (options["username"] != "undefined") {
  if (options["password"] != "<PASSWORD>") {
    username = options["username"];
    password = options["password"];
  }
}

log_chat = options["log_chat"]

var insults = [
"USER looks like a pinecone!",
"USER smells bad!",
"USER looks like a snowman!",
"USER probably isn't even a communist.",
"I don't like USER.",
"No one likes USER.",
"No one would miss USER.",
"USER is the reason cancer exists",
"Cancer would be a preferable alternative to USER.",
"I'd rather drink bleach than even see USER.",
"Does anyone else think USER should die?",
{'fraction_non_alphanumeric': 0.16348773841961853, 'fraction_numerical': 0.0006811989100817438, 'mean_word_length': 3.7218649517684885, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, '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': '427409', 'n_tokens_mistral': 926, 'n_tokens_neox': 906, 'n_words': 282}