<commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from txircd.utils import splitMessage
from zope.interface import implements

irc.ERR_INVALIDCAPCMD = "410"

class Cap(ModuleData, Command):
	implements(IPlugin, IModuleData, ICommand)
	
	name = "Cap"
	
	def actions(self):
		return [ ("capabilitylist", 10, self.listCapability) ]
	
	def userCommands(self):
		return [ ("CAP", 1, self) ]
	
	def load(self):
		self.ircd.moduleFunctionCache["cap-add"] = self.newCapability
		self.ircd.moduleFunctionCache["cap-del"] = self.removeCapability
		self.newCapability("cap-notify")
	
	def unload(self):
		self.removeCapability("cap-notify")
		del self.ircd.moduleFunctionCache["cap-add"]
		del self.ircd.moduleFunctionCache["cap-del"]
	
	def listCapability(self, capList):
		capList.append("cap-notify")
	<commit_msg>Fix name of function cache<commit_after>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from txircd.utils import splitMessage
from zope.interface import implements

irc.ERR_INVALIDCAPCMD = "410"

class Cap(ModuleData, Command):
	implements(IPlugin, IModuleData, ICommand)
	
	name = "Cap"
	
	def actions(self):
		return [ ("capabilitylist", 10, self.listCapability) ]
	
	def userCommands(self):
		return [ ("CAP", 1, self) ]
	
	def load(self):
		self.ircd.functionCache["cap-add"] = self.newCapability
		self.ircd.functionCache["cap-del"] = self.removeCapability
		self.newCapability("cap-notify")
	
	def unload(self):
		self.removeCapability("cap-notify")
		del self.ircd.functionCache["cap-add"]
		del self.ircd.functionCache["cap-del"]
	
	def listCapability(self, capList):
		capList.append("cap-notify")
	
{'fraction_non_alphanumeric': 0.11963023382272975, 'fraction_numerical': 0.0065252854812398045, 'mean_word_length': 5.501766784452297, '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': '1179657', 'n_tokens_mistral': 641, 'n_tokens_neox': 589, 'n_words': 130}