From 0745f642a710c90c7a71106db65674e92ad29691 Mon Sep 17 00:00:00 2001 From: Maik Kulbe Date: Wed, 7 May 2014 01:42:27 +0200 Subject: [PATCH] Added penis plugin --- plugins/penis.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/penis.py diff --git a/plugins/penis.py b/plugins/penis.py new file mode 100644 index 0000000..6636125 --- /dev/null +++ b/plugins/penis.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- + +from plugins.plugin import Plugin +from time import time + +class penis(Plugin): + def __init__(self): + pass + + def registerCommand(self, irc): + irc.registerCommand('!penis', 'Penis') + + def onPrivmsg(self, irc, msg, channel, user): + if msg.find('!penis') == -1: + return + + self.irc = irc + self.channel = channel + + try: + last_penis = irc.last_penis + except Exception as e: + last_penis = 0 + + if last_penis < (time() - 300): + irc.msg(channel, ' /\)') + irc.msg(channel, ' / /') + irc.msg(channel, '( Y)') + irc.last_penis = time() + else: + irc.msg(channel, "Don't over it ;)")