pimp.py 453 B

123456789101112131415161718
  1. class Pimp:
  2. def __init__(self, events=None, printer_handle=None, bot=None, say=None):
  3. self.events = events
  4. self.printer = printer_handle
  5. self.interests = ['__pimp__']
  6. self.bot = bot
  7. self.say = say
  8. self.cmd = ".pimp"
  9. self.help = None
  10. for event in events:
  11. if event._type in self.interests:
  12. event.subscribe(self)
  13. def handle(self, event):
  14. self.say(event.channel, "http://bitbucket.org/hlmtre/pybot")