def action(self, message, serv, event): msg = message.lower() if message.startswith(self.nick): command = extract_command(message) if command == "cassos": self.queue.stop() sleep(.7) # ensure the stop was read self.speak("ok je comprends") self.inputthread.stop() ttclient.trigger() sleep(.2) serv.disconnect("Au revoir, comme aurait dit VGE") sleep(2) syslog.syslog("quit on cassos irc message") sys.exit(0) elif command == "asv": self.asv() elif command == "onair": self.onair() elif command == "on air": self.onair() elif command == "like": self.like(irclib.nm_to_n(event.source())) elif command == "je kiffe": self.like(irclib.nm_to_n(event.source())) elif command == "love": self.like(irclib.nm_to_n(event.source())) elif command == "j'aime": self.like(irclib.nm_to_n(event.source())) elif command == "hate": self.hate(irclib.nm_to_n(event.source())) elif command == "caca": self.hate(irclib.nm_to_n(event.source())) elif command == "beurk": self.hate(irclib.nm_to_n(event.source())) elif command == "pouah": self.hate(irclib.nm_to_n(event.source())) elif command == "dislike": self.hate(irclib.nm_to_n(event.source())) elif command == "help": self.help() else: for plp in self.pl_prefix: if command == plp: self.addpl(message)
def action(self, message, serv): msg = message.lower() if message.startswith(self.nick): if message == "%s: cassos" % self.nick: self.queue.stop() sleep(.7) # ensure the stop was read self.speak("ok je comprends") self.inputthread.stop() ttclient.trigger() sleep(.2) serv.disconnect("Au revoir, comme aurait dit VGE") sleep(2) syslog.syslog("quit on cassos irc message") sys.exit(0) elif msg.startswith("%s: asv" % self.nick): self.asv() elif msg.startswith("%s: onair" % self.nick): self.onair() else: for plp in self.pl_prefix: if msg.startswith("%s: %s" % (self.nick, plp)): self.addpl(message)