<commit_before>var EventEmitter = require('events').EventEmitter,
    util = require('util'),
    _ = require('lodash'),
    DuplexStream = require('stream').Duplex,
    Commands = require('./commands'),
    Connection = require('./connection'),
    NetworkInfo = require('./networkinfo'),
    User = require('./user');

function IrcClient() {
    EventEmitter.call(this);
}

util.inherits(IrcClient, EventEmitter);

module.exports = IrcClient;

IrcClient.prototype._applyDefaultOptions = function(user_options) {
    var defaults = {
        nick: 'ircbot',
        username: 'ircbot',
        gecos: 'ircbot'
    };

    var props = Object.keys(defaults);
    for (var i=0; i<props.length; i++) {
        if (typeof user_options[props[i]] === 'undefined') {
            user_options[props[i]] = defaults[props[i]];
        }
    }<commit_msg>Default encoding<commit_after>var EventEmitter = require('events').EventEmitter,
    util = require('util'),
    _ = require('lodash'),
    DuplexStream = require('stream').Duplex,
    Commands = require('./commands'),
    Connection = require('./connection'),
    NetworkInfo = require('./networkinfo'),
    User = require('./user');

function IrcClient() {
    EventEmitter.call(this);
}

util.inherits(IrcClient, EventEmitter);

module.exports = IrcClient;

IrcClient.prototype._applyDefaultOptions = function(user_options) {
    var defaults = {
        nick: 'ircbot',
        username: 'ircbot',
        gecos: 'ircbot',
        encoding: 'utf8'
    };

    var props = Object.keys(defaults);
    for (var i=0; i<props.length; i++) {
        if (typeof user_options[props[i]] === 'undefined') {
            user_options[props[i]] = defaults[props[i]];
        }
    }
{'fraction_non_alphanumeric': 0.1619103086779266, 'fraction_numerical': 0.0017472335468841002, 'mean_word_length': 3.2524752475247523, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2429759', 'n_tokens_mistral': 528, 'n_tokens_neox': 520, 'n_words': 97}