# Erebus IRC bot - Author: Erebus Team
+# vim: fileencoding=utf-8
# simple coin module
# This file is released into the public domain; see http://unlicense.org/
modinfo = {
'author': 'Erebus Team',
'license': 'public domain',
- 'compatible': [1], # compatible module API versions
- 'depends': [], # other modules required to work properly?
+ 'compatible': [0],
+ 'depends': [],
+ 'softdeps': [],
}
# preamble
response = requests.post(url, data = {'pairs': pairs})
return json.loads(response.text)
-@lib.hook('btc')
-def cmd_gtest(bot, user, chan, realtarget, *args):
+@lib.hook()
+def btc(bot, user, chan, realtarget, *args):
if len(args) > 0:
try:
response = get_coin_price('btc_eur')
price = str(float(response[0]['price']))
bot.msg(chan, "1 BTC = %s EUR" % price)
-@lib.hook('doge')
-def cmd_gtest(bot, user, chan, realtarget, *args):
+@lib.hook()
+def doge(bot, user, chan, realtarget, *args):
if len(args) > 0:
try:
doge_btc = get_coin_price('doge_btc')
price = str(float(doge_btc[0]['price']) * float(btc_eur[0]['price']))
bot.msg(chan, "1 DOGE = %s EUR" % price)
-@lib.hook('ltc')
-def cmd_gtest(bot, user, chan, realtarget, *args):
+@lib.hook()
+def ltc(bot, user, chan, realtarget, *args):
if len(args) > 0:
try:
ltc_btc = get_coin_price('ltc_btc')