on_pubmsg.py 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import random
  2. def process_event(self, connection, event):
  3. if connection.get_nickname().lower() in event.arguments[0].lower() and event.source.nick is not connection.get_nickname(): # Bot's name was mentioned
  4. # Stop if it's a command.
  5. if event.arguments[0].startswith(self.cmdchar):
  6. return
  7. # Stop if channelfunction chat if off.
  8. chat = self.db.one("SELECT chat FROM channels WHERE name='" + event.target + "' AND network='" + self.network + "'")
  9. if not chat:
  10. return
  11. messages = [
  12. "Hello " + event.source.nick + ".",
  13. "How are you today " + event.source.nick + "?",
  14. "Piss off " + event.source.nick + "!",
  15. event.source.nick + ", what are you botherring me for?",
  16. "Go bother someone else...",
  17. "Is life treating you fair?",
  18. "What's up?",
  19. "Why are you talking to me?",
  20. "I'm not talking to you!",
  21. "What have you been up to?",
  22. "How is life?",
  23. "What do you wan't from me?",
  24. event.source.nick + ", why are you bothering me?",
  25. event.source.nick + ", when will you stop talking about me?",
  26. event.source.nick + " I hate you!",
  27. "Get bent!",
  28. "Go and cut yourself.",
  29. "Do you think i care about you?",
  30. "Stop nickalerting me " + event.source.nick + ", you wanker!",
  31. ]
  32. actions = [
  33. "hides!",
  34. "dies.",
  35. "runs away.",
  36. "is ignoring that.",
  37. "is not feeling like caring.",
  38. "is away",
  39. "will be ignoring that.",
  40. "is faggaliciouz!! <333",
  41. "likes you! <3",
  42. "looks the other way...",
  43. "does a little dance with " + event.source.nick + ".",
  44. "makes a little love.",
  45. "get's down tonight.",
  46. "thinks SAM Broadcaster sucks raw cocks in hell!",
  47. "is secretly in love with " + event.source.nick + ".",
  48. "tosses " + event.source.nick + "'s salad.",
  49. "tortures " + event.source.nick + " horribly!",
  50. "is smelling like tuna when looking at " + event.source.nick + ".",
  51. "sniffing armpits.. Eew! Smells like " + event.source.nick + ".",
  52. "rapes " + event.source.nick + ".",
  53. ]
  54. # Reply with a random message or action.
  55. if random.randint(0, 1) == 0:
  56. connection.privmsg(event.target, random.choice(messages))
  57. else:
  58. connection.action(event.target, random.choice(actions))