def is_match(self, form_uin, content, type): if not getattr(config, "SimSimi_Enabled", False): return False else: self.searcher=Searcher() print 'search' if self.searcher.find(content): result=self.searcher.search(content) if result>=0 : return True return True
class SimSimi2Plugin(BasePlugin): simsimi = None searcher=None def is_match(self, form_uin, content, type): if not getattr(config, "SimSimi_Enabled", False): return False else: self.searcher=Searcher() print 'search' if self.searcher.find(content): result=self.searcher.search(content) if result>=0 : return True return True def handle_message(self, callback): callback('abc')