<commit_before>// Setup
const HTTPServer = require('./lib/http_server')

// Exports
module.exports = Oacp

// Oacp Constructor
function Oacp (namespace) {
  var self = this
  self.models = {}
  self.channels = {}
  self.controllers = {}
  self.config = require('./config/app')(namespace)
  self._ns = self.config.app.namespace
  self.server = {http: new HTTPServer(self)}
  return self
}

/* COMPONENT REGISTRATION */
// Register model, returning the new model's Class
Oacp.prototype.registerModel = function (model) {
  var app = this
  var Model = require('./lib/model')(app, model)
  app.models[Model.name] = Model
  return Model
}

// Register channel, returning instance of new channel
Oacp.prototype.registerChannel = function (channel) {
  var app = this
  var Channel = require('./lib/channel')(app, channel)
  var thisChannel = Channel.new()
  app.channels[Channel.name] = thisChannel
  return thisChannel
}

// Register controller, returning instance of new controller
Oacp.prototype.registerController = function (controller, whitelist) {
  var app = this
  var Controller = require('./lib/controller')(app, controller, whitelist)
  var thisController = Controller.new()
  app.controllers[Controller.name] = thisController
  return thisController
}<commit_msg>Fix missing opts in registerChannel<commit_after>// Setup
const HTTPServer = require('./lib/http_server')

// Exports
module.exports = Oacp

// Oacp Constructor
function Oacp (namespace) {
  var self = this
  self.models = {}
  self.channels = {}
  self.controllers = {}
  self.config = require('./config/app')(namespace)
  self._ns = self.config.app.namespace
  self.server = {http: new HTTPServer(self)}
  return self
}

/* COMPONENT REGISTRATION */
// Register model, returning the new model's Class
Oacp.prototype.registerModel = function (model) {
  var app = this
  var Model = require('./lib/model')(app, model)
  app.models[Model.name] = Model
  return Model
}

// Register channel, returning instance of new channel
Oacp.prototype.registerChannel = function (channel, opts) {
  var app = this
  var Channel = require('./lib/channel')(app, channel)
  var thisChannel = Channel.new(opts)
  app.channels[Channel.name] = thisChannel
  return thisChannel
}

// Register controller, returning instance of new controller
Oacp.prototype.registerController = function (controller, whitelist) {
  var app = this
  var Controller = require('./lib/controller')(app, controller, whitelist)
  var thisController = Controller.new()
  app.controllers[Controller.name] = thisController
  return thisController
}
{'fraction_non_alphanumeric': 0.12082362082362082, 'fraction_numerical': 0.0, 'mean_word_length': 4.212550607287449, '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': '2901707', 'n_tokens_mistral': 756, 'n_tokens_neox': 752, 'n_words': 209}