36 lines
971 B
Python
36 lines
971 B
Python
|
###
|
||
|
# Copyright (c) 2011, henne
|
||
|
# All rights reserved.
|
||
|
#
|
||
|
#
|
||
|
###
|
||
|
from threading import Event, Thread
|
||
|
import subprocess
|
||
|
import supybot.utils as utils
|
||
|
from supybot.commands import *
|
||
|
import supybot.plugins as plugins
|
||
|
import supybot.ircutils as ircutils
|
||
|
import supybot.callbacks as callbacks
|
||
|
import supybot.ircmsgs as ircmsgs
|
||
|
import random
|
||
|
class Gem(callbacks.Plugin):
|
||
|
gemActive = False
|
||
|
def __init__(self, irc):
|
||
|
self.__parent = super(Gem, self)
|
||
|
self.__parent.__init__(irc)
|
||
|
def gem(self, irc, msg, args):
|
||
|
if self.gemActive:
|
||
|
irc.reply("Gem Deactivated")
|
||
|
else:
|
||
|
c = random.randint(1,100)
|
||
|
if c>99:
|
||
|
irc.reply("Perfect Gem Activated")
|
||
|
elif c>90:
|
||
|
irc.reply("Mooooooooooooo!")
|
||
|
else:
|
||
|
irc.reply("Gem Activated")
|
||
|
self.gemActive = not self.gemActive
|
||
|
gem = wrap(gem)
|
||
|
|
||
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|