diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-02-16 22:05:35 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-02-16 22:05:35 +0100 |
commit | 784ca0872a8d285854fe3ebbf90aefe5296a4439 (patch) | |
tree | 961b1a42c57692d950020f73a2bf37c38a332a6c /data/rbot/plugins/lastfm.rb | |
parent | b0c190de376cba959429b38f2fb44ec46d681910 (diff) |
lastfm: say something when user top/weekly chart is empty
Diffstat (limited to 'data/rbot/plugins/lastfm.rb')
-rw-r--r-- | data/rbot/plugins/lastfm.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 71fde1f4..29f85aab 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -550,7 +550,11 @@ class LastFmPlugin < Plugin :bold => Bold } end - m.reply items[0, num].join(", ") + if items.empty? + m.reply _("%{user} hasn't played anything in this period of time") % { :user => user } + else + m.reply items[0, num].join(", ") + end end end |