#!/usr/bin/python import re from ircbot import SingleServerIRCBot from random import randrange from time import sleep from subprocess import Popen class Bot(SingleServerIRCBot): def irc_connect(self): try: self.start() except KeyboardInterrupt: self.connection.quit("Ctrl-C at console") print "Quit IRC." except Exception, e: self.connection.quit("%s: %s" % (e.__class__.__name__, e.args)) raise def __init__(self, nickname, ircaddr, ircport, channel): SingleServerIRCBot.__init__(self, [(ircaddr, ircport)], nickname, nickname) self.channel = channel self.regex = re.compile(r'\b(?:ca*?tz?|meow)\b', re.MULTILINE | re.IGNORECASE) self.hatestrs = [""" _ _ _ _ __ __ _| |_ ___ | |_ __ _| |_ ___ | | / _/ _` | _|_ / | ' \/ _` | _/ -_) |_| \__\__,_|\__/__| |_||_\__,_|\__\___| (_) """, """ _ _ ___ _ _ (_) | |_ ( _ ) __ __ _| |_ ___ | | | | | ' \/ _ \ / _/ _` | _|_ / |_| |_| |_||_\___/ \__\__,_|\__/__| (_) """, """ _ _ _ _ _ ___ __ __ _| |_ ___ | |_ ___ _ _ ___ | | | ' \/ _ \ / _/ _` | _|_ / | ' \/ -_) '_/ -_) |_| |_||_\___/ \__\__,_|\__/__| |_||_\___|_| \___| (_) """, """ _ _ _ _ __| |_ ___ _ __ ___ __ _ _ _(_)_ _ __ _ __ __ _| |_ ___ | | (_-< _/ _ \ '_ \ (_-