Created
May 24, 2017 03:57
-
-
Save jwinterm/b306629662bfc8ab7c1da92d71a4291b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sopel.module | |
import time | |
nicklist = {} | |
paylist = {} | |
@sopel.module.event('JOIN') | |
@sopel.module.rule('.*') | |
def greeting(bot, trigger): | |
if trigger.sender == '#monero-pools' and trigger.nick != bot.nick: | |
if 'kiwiirc' in trigger.hostmask: | |
if trigger.nick not in nicklist or time.time()-nicklist[trigger.nick] > 60000: | |
nicklist[trigger.nick] = time.time() | |
time.sleep(3) | |
bot.notice('hi {0}, please see the FAQ for common questions related to mining: {1}'.format( | |
trigger.nick, 'https://git.io/vMVXk'), trigger.nick) | |
else: | |
nicklist[trigger.nick] = time.time() | |
@sopel.module.rule('.*(payout|payment).*') | |
def payout(bot, trigger): | |
if 'kiwiirc' in trigger.hostmask: | |
if trigger.nick not in paylist or time.time()-paylist[trigger.nick] > 60000: | |
bot.reply('To find your pools minimum payout threshold check the Payments tab') | |
paylist[trigger.nick] = time.time() | |
else: | |
paylist[trigger.nick] = time.time() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment