jimmies.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. from event import Event
  2. import random
  3. class Jimmies:
  4. def __init__(self, events=None, printer_handle=None, bot=None, say=None):
  5. self.events = events
  6. self.printer = printer_handle
  7. self.interests = ['__.jimmies__']
  8. self.bot = bot
  9. self.say = say
  10. jimmies = Event("__.jimmies__")
  11. jimmies.define(msg_definition="^\.jimmies")
  12. jimmies.subscribe(self)
  13. self.bot.register_event(jimmies, self)
  14. self.help = ".jimmies <nick>"
  15. def get_jimmies_status(self):
  16. """Randomly selects and returns a string with a "jimmies" status."""
  17. status = [" Rustled [ ] Not Rustled",
  18. "Rustled as fuck",
  19. "Rustled as fuark",
  20. "Rustled 'n' hustled",
  21. "Professor James R. Russel, Department of Primatology",
  22. "le monkey face",
  23. "No rustling. Only dreams now.",
  24. "Y'all rusting in a jimmies thread",
  25. "Haha. Oh god. Mah jimmies.",
  26. "The jimmies have been compromised.",
  27. "A gorillion jimmies.",
  28. "Boku no rustled",
  29. "Rustle of the Planet of the Jimmies",
  30. "You just rustled my jimmy card",
  31. "Micky Rourke as The Rustler",
  32. ">he thinks his jimmies are unrustled",
  33. "WWE Rustlemania",
  34. "Teach Me How To Jimmie",
  35. "#3 Rustle Wilson",
  36. "Rustle-it Ralph",
  37. "All those people. All that rustling.",
  38. "Rustle Brand",
  39. "Everyone's getting rustled!",
  40. "Did someone rustle your jimmies? Show me on the doll where they rustled you.",
  41. "Oh shit! My jimmies!"
  42. ]
  43. return "[X] " + random.choice(status)
  44. def handle(self, event):
  45. _z = event.msg.split(None, 1)
  46. jimmies_status = self.get_jimmies_status()
  47. try:
  48. self.say(event.channel, "Jimmies status for " + _z[1]+ ": " + jimmies_status)
  49. except IndexError:
  50. self.say(event.channel, "You didn\'t specify whose jimmies you wanted to check. " + event.user + "\'s jimmies status: " + jimmies_status)
  51. except TypeError:
  52. print "DEBUG: TypeError: ",
  53. print event.channel,
  54. print event.user