<commit_before>from module import XMPPModule

class Admin(XMPPModule):

	def handleMessage(self, msg):
		cmd, string = (msg["body"].split(" ")[0], " ".join(msg["body"].split(" ")[1:]))
		if cmd == "!reloadmodules" and self.xmpp.isadmin(msg=msg):
			mods = self.xmpp.load_modules()
			self.xmpp.reply(msg, "Modules reloaded successfully! Registered modules: " + ", ".join(mods))

	def help(self, feature):
		if feature == None:
			return '''
Admin module provides methods to manage the Bot while it is live.
 Features:
   !reloadmodules - Stop all modules, and reload all enabled modules'''<commit_msg>Added a single module loading functionality<commit_after>from module import XMPPModule
import halutils

class Admin(XMPPModule):

	def handleMessage(self, msg):
		cmd, args = halutils.splitArgList(msg)
		if cmd == "!reloadmodules" and self.xmpp.isadmin(msg=msg):
			mods = self.xmpp.load_modules()
			self.xmpp.reply(msg, "Modules reloaded successfully! Registered modules: " + ", ".join(mods))
		elif cmd == "!load":
			if len(args) == 0:
				self.xmpp.reply(msg, "Please supply names of modules to load!")
				return
			for m in args:
				if self.xmpp.load_module(m):
					self.xmpp.reply(msg, "Successfully loaded " + m)
				else:
					self.xmpp.reply(msg, "Failed to load " + m)

	def help(self, feature):
		if feature == None:
			return '''
Admin module provides methods to manage the Bot while it is live.
 Features:
   !reloadmodules - Stop all modules, and reload all enabled modules'''
{'fraction_non_alphanumeric': 0.13377926421404682, 'fraction_numerical': 0.002006688963210702, 'mean_word_length': 4.2125435540069684, 'pattern_counts': {'":': 1, '<': 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': '4586986', 'n_tokens_mistral': 533, 'n_tokens_neox': 484, 'n_words': 150}