From 301f9b65c8c5d3c91c7af9892870b01977e2c1bb Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Tue, 20 Apr 2010 20:36:25 +0300 Subject: lastfm: require spotify plugin to be enabled for spotify link info --- data/rbot/plugins/lastfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 57cf3ec1..ad013bba 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -387,7 +387,7 @@ class LastFmPlugin < Plugin reply = _("%{u} %{v} \"%{t}\" by %{bold}%{a}%{bold}%{b} %{p};") % {:u => user, :v => verb, :t => track, :a => artist, :b => album, :p => ago, :bold => Bold} end - if Object.const_defined?('Spotify') + if @bot.plugins['spotify'] && Object.const_defined?('Spotify') if track = Spotify.search(:track, "#{artist} #{track}") reply << _(" [%{u}%{url}%{u}]") % {:u => Underline, :url => track.url} end -- cgit v1.2.3