def __init__(self,bot): BotModule.__init__(self,bot) directory="./plugins" if not directory.endswith(os.sep): directory=directory+os.sep for f in os.listdir(directory): if f.endswith(".py") and f!="__init__.py": self.bot.load_module(directory+f)
def __init__(self,bot): BotModule.__init__(self,bot) self.rules=data.DataConf("%s/rules.py" % self.bot.data_dir,default_rules) self.compiled_rules={} for id,rule in self.rules.items(): self.compiled_rules[id]=self.precompile_rule(rule) self.interet=1.0 self.inconscient=Inconscient(self,5) self.inconscient.start()
def __init__(self, bot): BotModule.__init__(self, bot) self.rules = data.DataConf("%s/rules.py" % self.bot.data_dir, default_rules) self.compiled_rules = {} for id, rule in self.rules.items(): self.compiled_rules[id] = self.precompile_rule(rule) self.interet = 1.0 self.inconscient = Inconscient(self, 5) self.inconscient.start()
def __init__(self,bot): BotModule.__init__(self,bot) self.words_in_lines={} self.lines={} self.contexts={} self.previous_chosen_words_in_lines={} self.nb_writes=0 self.allowed_semantics=self.bot.conf["markov_allowed_semantics"] for sem in self.allowed_semantics: self.lines[sem]=data.DataMarshal("%s/markov_lines_%s.py" % (self.bot.data_dir,sem),save_interval=10000000) self.words_in_lines[sem]=data.DataMarshal("%s/markov_words_%s.py" % (self.bot.data_dir,sem),save_interval=10000000) self.contexts[sem]=data.DataMarshal("%s/markov_contexts_%s.py" % (self.bot.data_dir,sem),save_interval=10000000) self.previous_chosen_words_in_lines[sem]={} self.bot.hook_pre_message(self.learn)
def __init__(self, bot): BotModule.__init__(self, bot) self.words_in_lines = {} self.lines = {} self.contexts = {} self.previous_chosen_words_in_lines = {} self.nb_writes = 0 self.allowed_semantics = self.bot.conf["markov_allowed_semantics"] for sem in self.allowed_semantics: self.lines[sem] = data.DataMarshal("%s/markov_lines_%s.py" % (self.bot.data_dir, sem), save_interval=10000000) self.words_in_lines[sem] = data.DataMarshal( "%s/markov_words_%s.py" % (self.bot.data_dir, sem), save_interval=10000000) self.contexts[sem] = data.DataMarshal("%s/markov_contexts_%s.py" % (self.bot.data_dir, sem), save_interval=10000000) self.previous_chosen_words_in_lines[sem] = {} self.bot.hook_pre_message(self.learn)
def __init__(self, bot): BotModule.__init__(self, bot) self.dico = data.DataConf("%s/dico.py" % self.bot.data_dir) for v in self.dico.values(): if isinstance(v, Code): v.dicofun = self.get_dico
def __init__(self,bot): BotModule.__init__(self,bot) self.server=WebServer(self,bot.conf["report_port"]) self.server.start()
def __init__(self, bot): BotModule.__init__(self, bot) self.quotes = data.DataConf("%s/quotes.py" % self.bot.data_dir) self.r = re.compile(r"(<\w+>)")
def __init__(self,bot): BotModule.__init__(self,bot) self.jeux={} self.stats=data.DataPickle("%s/bataille_stats.dat" % self.bot.data_dir)
def __init__(self, bot): BotModule.__init__(self, bot) self.jeux = {} self.stats = data.DataPickle("%s/bataille_stats.dat" % self.bot.data_dir)
def __init__(self,bot): BotModule.__init__(self,bot) self.sems={self.SEM_CLEAN: CleanSemantics(self)}
def __init__(self, bot): BotModule.__init__(self, bot) self.server = WebServer(self, bot.conf["report_port"]) self.server.start()
def __init__(self,bot): BotModule.__init__(self,bot) self.quotes=data.DataConf("%s/quotes.py" % self.bot.data_dir) self.r=re.compile(r"(<\w+>)")