Merge branch 'master' of hackerspace.pl:q3k/mun
Conflicts: plugins/bitcoin.lua
This commit is contained in:
commit
74fca86d34
1 changed files with 9 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue