<commit_before>#! /usr/bin/env python
# coding=utf8

# Baseclass of all modules, handles important stuff
class BotModule(object):
	def __init__(self):
		return

	def tick(self):
		return

	def onMessage(self, type, msg):
		return
	
	def setup(self, nick,  private, public, privaction, pubaction, kick, debug, users):
		self.nick = nick
		self.sendPrivateMessage = private
		self.sendPublicMessage = public
		self.sendPrivateAction = privaction
		self.sendPublicAction = pubaction
		self.kick = kick
		self.DEBUG = debug
		self.getAllUsers = users

# An example on howto write modules
class HelloWorldExample(BotModule):
	def __init__(self):
		return

	def command(self, nick, cmd, args, type):
		if cmd == "!hello":
			if type == "private":
				self.sendPrivateMessage(nick, "world!")
			else:
				self.sendPublicMessage("world!")<commit_msg>Added isOper() to modul functions<commit_after>#! /usr/bin/env python
# coding=utf8

# Baseclass of all modules, handles important stuff
class BotModule(object):
	def __init__(self):
		return

	def tick(self):
		return

	def onMessage(self, type, msg):
		return
	
	def setup(self, nick,  private, public, privaction, pubaction, isOper, kick, debug, users):
		self.nick = nick
		self.sendPrivateMessage = private
		self.sendPublicMessage = public
		self.sendPrivateAction = privaction
		self.sendPublicAction = pubaction
		self.isOper = isOper
		self.kick = kick
		self.DEBUG = debug
		self.getAllUsers = users

# An example on howto write modules
class HelloWorldExample(BotModule):
	def __init__(self):
		return

	def command(self, nick, cmd, args, type):
		if cmd == "!hello":
			if type == "private":
				self.sendPrivateMessage(nick, "world!")
			else:
				self.sendPublicMessage("world!")
{'fraction_non_alphanumeric': 0.10893371757925072, 'fraction_numerical': 0.0011527377521613833, 'mean_word_length': 4.3580246913580245, 'pattern_counts': {'":': 4, '<': 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': '5349453', 'n_tokens_mistral': 605, 'n_tokens_neox': 543, 'n_words': 160}