From d99a5874d63fb1660d1ff65369f98b5075df03d1 Mon Sep 17 00:00:00 2001 From: Flummi Date: Fri, 20 Oct 2017 08:39:41 +0200 Subject: [PATCH] blah --- s/contact.tpl.html | 13 +++++++++++++ s/how.tpl.html | 13 +++++++++++++ s/index.tpl.html | 13 +++++++++++++ s/item.tpl.html | 18 +++++++++++------- src/trigger/xmr.js | 19 +++++++++++++++++++ 5 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 src/trigger/xmr.js diff --git a/s/contact.tpl.html b/s/contact.tpl.html index 81759ab..1a89c9e 100644 --- a/s/contact.tpl.html +++ b/s/contact.tpl.html @@ -10,5 +10,18 @@ return to main + + diff --git a/s/how.tpl.html b/s/how.tpl.html index a3c1f27..58f4874 100644 --- a/s/how.tpl.html +++ b/s/how.tpl.html @@ -29,5 +29,18 @@ return to main + + diff --git a/s/index.tpl.html b/s/index.tpl.html index 09f365a..caa890d 100644 --- a/s/index.tpl.html +++ b/s/index.tpl.html @@ -17,5 +17,18 @@ + + diff --git a/s/item.tpl.html b/s/item.tpl.html index 43e5227..175b290 100644 --- a/s/item.tpl.html +++ b/s/item.tpl.html @@ -52,14 +52,18 @@ - + diff --git a/src/trigger/xmr.js b/src/trigger/xmr.js new file mode 100644 index 0000000..bd04100 --- /dev/null +++ b/src/trigger/xmr.js @@ -0,0 +1,19 @@ +const request = require("request"); + +module.exports = (lib) => { + lib.trigger.add({ + name: 'xmr', + call: /^!xmr/i, + level: 100, + active: 1, + func: (e) => { + request(`https://api.coin-hive.com/stats/site/f0ck?secret=${lib.cfg.main.xmrkey}`, (error, response, body) => { + if(!error) { + body = JSON.parse(body); + e.reply(`Hashes/s: ${body.hashesPerSecond} ; Total: ${body.hashesTotal}`); + } + }); + }, + desc: 'muh' + }); +}; \ No newline at end of file