From cec92c7ed9f4072a9461783cf9f744b9069488f5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Oct 2017 02:25:13 +0000 Subject: [PATCH] Update donate and add b2x --- network.py | 12 ++++++++++++ trifling.py | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/network.py b/network.py index f5f2d1d..3e35130 100644 --- a/network.py +++ b/network.py @@ -62,3 +62,15 @@ def blocksize(bot, trigger): bot.say("Median blocksize over last 200 blocks is {0} bytes".format(size.group(1))) except: bot.say("Bomething sorked 0_0") + +@sopel.module.commands('b2x') +def b2x(bot, trigger): + try: + r=requests.get('https://blockchain.info/latestblock') + j=r.json() + height=j['height'] + forkheight=494784 + blocks=forkheight-int(height) + bot.say("Bitcoin S2X fork due to happen on block {}. Current block is {}. 10 min per block estimate gives {} min, or {:.2f} hour, or {:.2f} days.".format(forkheight, height, blocks*10, blocks*0.16666, blocks*0.006944)) + except: + bot.say("Bitcoin sucks.") diff --git a/trifling.py b/trifling.py index 58fafff..8f084fc 100644 --- a/trifling.py +++ b/trifling.py @@ -104,7 +104,8 @@ def ded(bot, trigger): @sopel.module.commands('donate', 'donation') def donate(bot, trigger): - bot.say('45SkxgDmcLmW5ByS7w9AG78JuJRvCoVKCdGJWnd4US95CBUAtvdGAdM2oHgZgTGjkEAUcwdqcryM819aqdeiKxHSQC8HkmS', trigger.nick) + bot.say('XMR: 45SkxgDmcLmW5ByS7w9AG78JuJRvCoVKCdGJWnd4US95CBUAtvdGAdM2oHgZgTGjkEAUcwdqcryM819aqdeiKxHSQC8HkmS', trigger.nick) + bot.say('BTC: 14X8aMUtuxH2HWLtsNAxxN7j9uqQNUdMzB', trigger.nick) @sopel.module.commands('dump') def dump(bot, trigger): @@ -530,6 +531,10 @@ def wave(bot, trigger): #@sopel.module.rule('[Tt]rump') #def politics(bot, trigger): # bot.reply("politics is the mind killer") + +@sopel.module.rule('.*1Dj34exPs3S9qAV1aiGAAADzbashsSVKVP*.') +def scamdouble(bot, trigger): + bot.say("{} is a scammer and bitcoin is a scam".format(trigger.nick)) @sopel.module.commands('asp') def asp(bot, trigger):