Merge branch 'master' of hackerspace.pl:q3k/mun

Conflicts:
	plugins/bitcoin.lua
This commit is contained in:
q3k 2013-11-28 10:22:52 +01:00
commit 74fca86d34

View file

@ -11,7 +11,11 @@ local GetRates = function()
end
local Rates = {}
<<<<<<< HEAD
for _, Market in pairs(Rates) do
=======
for _, Market in pairs(Data) do
>>>>>>> c6688a87ae38c2a483731ec9f4da072f2132c725
local Rate = {}
Rate.high = Market.high
Rate.low = Market.low
@ -23,7 +27,11 @@ local GetRates = function()
end
local FormatData = function(Rate, Key)
<<<<<<< HEAD
local Value = Rate[key]
=======
local Value = Rate[Key]
>>>>>>> c6688a87ae38c2a483731ec9f4da072f2132c725
local Currency = Rate.currency
return string.format("%.2f %s", Value, Currency)
@ -33,7 +41,7 @@ local DefaultRates = {'mtgoxUSD', 'mtgoxPLN', 'bitcurexPLN'}
plugin.AddCommand('btc', 0, function(Username, Channel)
local Rates = GetRates()
for _, Key in pairs(DefaultRates) do
local Rate = Rates[key]
local Rate = Rates[Key]
local High = FormatData(Rate, 'high')
local Low = FormatData(Rate, 'low')
local Avg = FormatData(Rate, 'avg')