<commit_before>var net             = require('net'),
    tls             = require('tls'),
    util            = require('util'),
    _               = require('lodash'),
    EventEmitter2   = require('eventemitter2').EventEmitter2,
    EventBinder     = require('./eventbinder.js'),
    IrcServer       = require('./server.js'),
    IrcChannel      = require('./channel.js'),
    IrcUser         = require('./user.js'),
    Socks;
 
 
// Break the Node.js version down into usable parts
var version_values = process.version.substr(1).split('.').map(function (item) {
    return parseInt(item, 10);
});
 
// If we have a suitable Nodejs version, bring int he socks functionality
if (version_values[0] >= 10) {
    Socks = require('../socks.js');
}

var IrcConnection = function (hostname, port, ssl, nick, user, pass, state) {
    var that = this;

    EventEmitter2.call(this,{
        wildcard: true,
        delimiter: ':'
    });
    this.setMaxListeners(0);
    
    // Socket state
    this.connected = false;

    // If registeration with the IRCd has completed
    this.registered = false;

    // If we are in the CAP negotiation stage
    this.cap_negotiation = true;

    // User information<commit_msg>Fix off-by-one error in checking node version<commit_after>var net             = require('net'),
    tls             = require('tls'),
    util            = require('util'),
    _               = require('lodash'),
    EventEmitter2   = require('eventemitter2').EventEmitter2,
    EventBinder     = require('./eventbinder.js'),
    IrcServer       = require('./server.js'),
    IrcChannel      = require('./channel.js'),
    IrcUser         = require('./user.js'),
    Socks;
 
 
// Break the Node.js version down into usable parts
var version_values = process.version.substr(1).split('.').map(function (item) {
    return parseInt(item, 10);
});

// If we have a suitable Nodejs version, bring int he socks functionality
if (version_values[1] >= 10) {
    Socks = require('../socks.js');
}

var IrcConnection = function (hostname, port, ssl, nick, user, pass, state) {
    var that = this;

    EventEmitter2.call(this,{
        wildcard: true,
        delimiter: ':'
    });
    this.setMaxListeners(0);
    
    // Socket state
    this.connected = false;

    // If registeration with the IRCd has completed
    this.registered = false;

    // If we are in the CAP negotiation stage
    this.cap_negotiation = true;

    // User information
{'fraction_non_alphanumeric': 0.13420089467263116, 'fraction_numerical': 0.008946726311508743, 'mean_word_length': 2.3977900552486187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2232501', 'n_tokens_mistral': 748, 'n_tokens_neox': 714, 'n_words': 193}