<commit_before>/*
 * Copyright (c) 2014, <NAME>, https://bitbucket.org/sgt-kabukiman/
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

var
	TwitchClient = require('./lib/TwitchClient.js'),
	Channel      = require('./lib/Channel.js'),
	Core         = require('./lib/Plugin/Core.js'),
	Dummy        = require('./lib/Plugin/ConsoleOutput.js'),
	irc          = require('irc'),
	sqlite3      = require('sqlite3');

var ircClient = new irc.Client('irc.twitch.tv', '...', {
	showErrors: true,
	autoConnect: false,
	floodProtection: true,
	floodProtectionDelay: 1000, // 1 sec
	password: '...',
	realName: '...',
	debug: false
});

var db = new sqlite3.Database('test.sqlite3', sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, function() {
	// db.run('CREATE TABLE IF NOT EXISTS channels (name VARCHAR(200), ')
});

var twitchClient = new TwitchClient(ircClient, {
	ttl: {
		turbo: 5000,
		admin: 5000,
		staff: 5000,
		subscriber: 5000
	}
});

twitchClient.addPlugin(new Core(db));
twitchClient.addPlugin(new Dummy(console));

twitchClient.connect([
	new Channel('...')
]);<commit_msg>load the new plugins<commit_after>/*
 * Copyright (c) 2014, <NAME>, https://bitbucket.org/sgt-kabukiman/
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

var
	// load core libraries
	TwitchClient = require('./lib/TwitchClient.js'),
	Channel      = require('./lib/Channel.js'),

	// load plugins
	CorePlugin           = require('./lib/Plugin/Core.js'),
	ConsoleOutputPlugin  = require('./lib/Plugin/ConsoleOutput.js'),
	EatOwnMessagesPlugin = require('./lib/Plugin/EatOwnMessages.js'),
	PingPlugin           = require('./lib/Plugin/Ping.js'),
	JoinPlugin           = require('./lib/Plugin/Join.js'),

	// load vendor libraries
	irc     = require('irc'),
	sqlite3 = require('sqlite3');

////////////////////////////////////////////////////////////////////////////////

var ircClient = new irc.Client('irc.twitch.tv', '...', {
	showErrors: true,
	autoConnect: false,
	floodProtection: true,
	floodProtectionDelay: 1000, // 1 sec
	password: '...',
	realName: '...',
	debug: false
});

var db = new sqlite3.Database('test.sqlite3', sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, function() {
	// db.run('CREATE TABLE IF NOT EXISTS channels (name VARCHAR(200), ')
});

var twitchClient = new TwitchClient(ircClient, {
	ttl: {
		turbo: 5000,
		admin: 5000,
		staff: 5000,
		subscriber: 5000
	},
	op: '...',
	account: {
		username: '...',
		oauthToken: '...'
	}
});

twitchClient.addPlugin(new CorePlugin(db));
twitchClient.addPlugin(new ConsoleOutputPlugin(console));
twitchClient.addPlugin(new EatOwnMessagesPlugin());
twitchClient.addPlugin(new PingPlugin(console));
twitchClient.addPlugin(new JoinPlugin(db));

twitchClient.connect([
	new Channel('...')
]);
{'fraction_non_alphanumeric': 0.18747940691927512, 'fraction_numerical': 0.022405271828665568, 'mean_word_length': 3.3309557774607703, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3116918', 'n_tokens_mistral': 1072, 'n_tokens_neox': 980, 'n_words': 223}