<commit_before>#!/usr/bin/env python
import os.path
from lib.pybot import BotBot
from lib.plugindispatcher import PluginDispatcher

class PealBot(BotBot):
	def __init__(self, config):
		BotBot.__init__(self, config)
		
		self.plugin_dispatcher = None
		self.init_plugins()

	def init_plugins(self):
		script_dir = os.path.dirname(__file__)
		plugin_dir = os.path.join(script_dir, self.config['plugindir'])

		self.plugin_dispatcher = PluginDispatcher(self, plugin_dir)
		self.plugin_dispatcher.load_plugins(self.config['autoload'])

	def on_privmsg(self, params):
		text = params['text']

	def invoke_hook(self, method, msg_parts):
		BotBot.invoke_hook(self, method, msg_parts)
		self.plugin_dispatcher.invoke_hook(method, msg_parts)

if __name__ == '__main__':
	config = {
		"server": ("irc.freenode.org", 6667),
		"autojoin": '#bsxlab',
		"plugindir": "plugins",
		"autoload": [
			'basic.Basic',
			'quotes.Quotes',
		],

		"nick": "jxBot",
		"realname": "Cool Bot",
		"password": "<PASSWORD>"
	}

	pb = PealBot(config)
	pb.start()<commit_msg>Bugfix<commit_after>#!/usr/bin/env python
import os.path
from lib.pybot import BotBot
from lib.plugindispatcher import PluginDispatcher

class PealBot(BotBot):
	def __init__(self, config):
		BotBot.__init__(self, config)
		
		self.plugin_dispatcher = None
		self.init_plugins()

	def init_plugins(self):
		script_dir = os.path.dirname(__file__)
		plugin_dir = os.path.join(script_dir, self.config['plugindir'])

		self.plugin_dispatcher = PluginDispatcher(self, plugin_dir)
		self.plugin_dispatcher.load_plugins(self.config['autoload'])

	def on_privmsg(self, params):
		text = params['text']

	def invoke_hook(self, method, msg_parts):
		BotBot.invoke_hook(self, method, msg_parts)
		self.plugin_dispatcher.invoke_hook(method, msg_parts)

if __name__ == '__main__':
	config = {
		"server": ("irc.freenode.org", 6667),
		"autojoin": '#bsxlab',
		"plugindir": "plugins",
		"autoload": [
			'basic.Basic',
			'quotes.Quotes',
		],

		"nick": "jxBot",
		"realname": "Cool Bot",
		"password": "<PASSWORD>"
	}

	pb = PealBot(config)
	pb.start()
{'fraction_non_alphanumeric': 0.1486810551558753, 'fraction_numerical': 0.0038369304556354917, 'mean_word_length': 5.153392330383481, 'pattern_counts': {'":': 14, '<': 5, '<?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': '555679', 'n_tokens_mistral': 841, 'n_tokens_neox': 755, 'n_words': 141}