tipjar 0.1.195 → 0.1.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/bitbot/plugin/common.rb +1 -20
- data/lib/bitbot/plugin/deposit.rb +1 -2
- data/lib/bitbot/plugin/tip.rb +2 -4
- data/lib/bitbot/plugin/withdraw.rb +2 -3
- data/tipjar.gemspec +1 -1
- metadata +1 -1
data/lib/bitbot/plugin/common.rb
CHANGED
@@ -85,24 +85,6 @@ module Bitbot::Common
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
-
def satoshi_to_gbp(satoshi)
|
89
|
-
rate = exchange_rate("GBP")
|
90
|
-
if rate
|
91
|
-
"$%.2f" % (satoshi.to_f / 10**8 * rate)
|
92
|
-
else
|
93
|
-
"$?"
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
def satoshi_to_eur(satoshi)
|
98
|
-
rate = exchange_rate("EUR")
|
99
|
-
if rate
|
100
|
-
"$%.2f" % (satoshi.to_f / 10**8 * rate)
|
101
|
-
else
|
102
|
-
"$?"
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
88
|
def satoshi_with_usd(satoshi)
|
107
89
|
btc_str = satoshi_to_str(satoshi)
|
108
90
|
if satoshi < 0
|
@@ -111,9 +93,8 @@ module Bitbot::Common
|
|
111
93
|
btc_str = btc_str.irc(:green)
|
112
94
|
end
|
113
95
|
|
114
|
-
usd_str = "[".irc(:grey) + satoshi_to_usd(satoshi).irc(:
|
96
|
+
usd_str = "[".irc(:grey) + satoshi_to_usd(satoshi).irc(:light_grey) + "]".irc(:grey)
|
115
97
|
|
116
98
|
"#{btc_str} #{usd_str}"
|
117
99
|
end
|
118
100
|
end
|
119
|
-
|
@@ -3,7 +3,7 @@ module Bitbot::Deposit
|
|
3
3
|
user_id = db.get_or_create_user_id_for_username(m.user.user)
|
4
4
|
|
5
5
|
unless cached_addresses
|
6
|
-
m.reply "Sorry, TipJar is initializing
|
6
|
+
m.reply "Sorry, TipJar is initializing it's database. Please try again later."
|
7
7
|
return
|
8
8
|
end
|
9
9
|
|
@@ -30,4 +30,3 @@ module Bitbot::Deposit
|
|
30
30
|
on_deposit(m, false)
|
31
31
|
end
|
32
32
|
end
|
33
|
-
|
data/lib/bitbot/plugin/tip.rb
CHANGED
@@ -24,7 +24,7 @@ module Bitbot::Tip
|
|
24
24
|
begin
|
25
25
|
db.create_transaction_from_tip(user_id, recipient_user_id, satoshi, message)
|
26
26
|
rescue Bitbot::InsufficientFundsError
|
27
|
-
m.reply "Insufficient funds! It's the thought that counts though
|
27
|
+
m.reply "Insufficient funds! It's the thought that counts though....", true
|
28
28
|
return
|
29
29
|
end
|
30
30
|
|
@@ -54,8 +54,6 @@ module Bitbot::Tip
|
|
54
54
|
m.channel.name.irc(:bold) +
|
55
55
|
" bringing your balance to " +
|
56
56
|
satoshi_with_usd(db.get_balance_for_user_id(recipient_user_id)) +
|
57
|
-
". Type 'help' to list TipJar
|
57
|
+
". Type 'help' to list TipJar commands."
|
58
58
|
end
|
59
59
|
end
|
60
|
-
|
61
|
-
|
@@ -14,7 +14,7 @@ module Bitbot::Withdraw
|
|
14
14
|
begin
|
15
15
|
db.create_transaction_from_withdrawal(user_id, satoshi, withdrawal_fee, address)
|
16
16
|
rescue Bitbot::InsufficientFundsError
|
17
|
-
m.reply "You don't have enough to withdraw #{satoshi_to_str(satoshi)} + 0.0005
|
17
|
+
m.reply "You don't have enough to withdraw #{satoshi_to_str(satoshi)} + 0.0005 fee"
|
18
18
|
return
|
19
19
|
end
|
20
20
|
|
@@ -24,7 +24,7 @@ module Bitbot::Withdraw
|
|
24
24
|
"in transaction #{response["tx_hash"].irc(:grey)}."
|
25
25
|
else
|
26
26
|
m.reply "Something may have gone wrong with your withdrawal. Please contact " +
|
27
|
-
"your friendly TipJar
|
27
|
+
"your friendly TipJar administrator to investigate where your money is."
|
28
28
|
end
|
29
29
|
else
|
30
30
|
m.reply "Usage: withdraw <amount in BTC> <address>"
|
@@ -32,4 +32,3 @@ module Bitbot::Withdraw
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
data/tipjar.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{tipjar}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.196"
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ["WeirdThall", "Zach Wily"]
|
8
8
|
s.email = ["weirdthall@gmail.com", "zach@zwily.com"]
|