Cinch-Tell 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/lib/cinch/plugins/tell.rb +3 -1
- data/lib/cinch/plugins/tell/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a028a89b45e1e70689aaa2e8b9c5181ee195a071
|
4
|
+
data.tar.gz: f8d79a4f48031d014756d1679b698edad06ec83b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e96a2baafa668b4f76ce828eb08b826f69f37385a352f7eaccf17b6acc7cc0b661ec8d0a392ee82dd0edbd08636829e8c92e7be29cb00198b43e61a1b6c8a04
|
7
|
+
data.tar.gz: 262adc6ee547e7db1bf5c9b8a1effe13000e636eeea35aee672194f6a8e0e83e8b851c6f6520244df7167a7bad5d3c65c770f19e4d0e08cca6702f647b1e69a1
|
data/lib/cinch/plugins/tell.rb
CHANGED
@@ -52,12 +52,14 @@ module Cinch
|
|
52
52
|
msg = tell[:message]
|
53
53
|
msg_when = tell[:time]
|
54
54
|
timediff = Time.diff(Time.at(msg_when), Time.now)
|
55
|
-
|
55
|
+
puts "when: #{msg_when}, now: #{Time.now}, timediff: #{timediff}"
|
56
|
+
output = "#{from_nick} wanted to tell you '#{msg}', "
|
56
57
|
# lots of unless, could use timediff[:diff] but it's ugly
|
57
58
|
ago_str = ''
|
58
59
|
ago_str = "#{timediff[:year]} years, " unless timediff[:year].zero?
|
59
60
|
ago_str << "#{timediff[:month]} months, " unless timediff[:month].zero?
|
60
61
|
ago_str << "#{timediff[:week]} weeks, " unless timediff[:week].zero?
|
62
|
+
ago_str << "#{timediff[:day]} days, " unless timediff[:day].zero?
|
61
63
|
ago_str << "#{timediff[:hour]} hours, " unless timediff[:hour].zero?
|
62
64
|
ago_str << "#{timediff[:minute]} minutes, " unless timediff[:minute].zero?
|
63
65
|
ago_str << 'and ' unless ago_str.empty?
|