| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import random, datetime
- def process_event(self, connection, event):
- if connection.get_nickname().lower() in event.arguments[0].lower() and event.source.nick is not connection.get_nickname(): # Bot's name was mentioned
- if event.arguments[0].startswith(self.cmdchar):
- return # Stop if it's a command.
- if not self.db.one("SELECT chat FROM channels WHERE name='" + event.target + "' AND network='" + self.network + "'"):
- return # Stop if channelfunction chat if off.
-
- messages = [
- "Hello " + event.source.nick + ".",
- "How are you today " + event.source.nick + "?",
- "Piss off " + event.source.nick + "!",
- event.source.nick + ", what are you botherring me for?",
- "Go bother someone else...",
- "Is life treating you fair?",
- "What's up?",
- "Why are you talking to me?",
- "I'm not talking to you!",
- "What have you been up to?",
- "How is life?",
- "What do you wan't from me?",
- event.source.nick + ", why are you bothering me?",
- event.source.nick + ", when will you stop talking about me?",
- event.source.nick + " I hate you!",
- "Get bent!",
- "Go and cut yourself.",
- "Do you think i care about you?",
- "Stop nickalerting me " + event.source.nick + ", you wanker!",
- ]
- actions = [
- "hides!",
- "dies.",
- "runs away.",
- "is ignoring that.",
- "is not feeling like caring.",
- "is away",
- "will be ignoring that.",
- "is faggaliciouz!! <333",
- "likes you! <3",
- "looks the other way...",
- "does a little dance with " + event.source.nick + ".",
- "makes a little love.",
- "get's down tonight.",
- "thinks SAM Broadcaster sucks raw cocks in hell!",
- "is secretly in love with " + event.source.nick + ".",
- "tosses " + event.source.nick + "'s salad.",
- "tortures " + event.source.nick + " horribly!",
- "is smelling like tuna when looking at " + event.source.nick + ".",
- "sniffing armpits.. Eew! Smells like " + event.source.nick + ".",
- "rapes " + event.source.nick + ".",
- ]
-
- # Reply with a random message or action.
- if random.randint(0, 1) == 0:
- connection.privmsg(event.target, random.choice(messages))
- else:
- connection.action(event.target, random.choice(actions))
-
- # Character lame.
- elif event.arguments[0] == len(event.arguments[0]) * event.arguments[0][0]: # Trigger exclusively same character.
-
- # Stop if chat channel function is off.
- if not self.db.one("SELECT chat FROM channels WHERE name='" + event.target + "' AND network='" + self.network + "'"):
- return
-
- # Stop if lamed recently.
- lastlame = self.db.one("SELECT last_lame FROM channels WHERE name='" + event.target + "' AND network='" + self.network + "'")
- if lastlame and lastlame > datetime.datetime.now() - datetime.timedelta(minutes=2): # In the last 2 minutes.
- return
-
- # Update lastlame.
- self.db.run("UPDATE channels SET last_lame='" + str(datetime.datetime.now()) + "' WHERE name='" + event.target + "' AND network='" + self.network + "'")
-
- connection.privmsg(event.target, event.arguments[0] + ".")
|