From b7fad38870b04450feafaf3e96ba4b3011816049 Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Wed, 16 Dec 2009 22:33:30 +0200 Subject: spotify: fail on load if Spotify module is not available --- data/rbot/plugins/spotify.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'data') diff --git a/data/rbot/plugins/spotify.rb b/data/rbot/plugins/spotify.rb index 95fe5842..29331c00 100644 --- a/data/rbot/plugins/spotify.rb +++ b/data/rbot/plugins/spotify.rb @@ -10,6 +10,14 @@ # License:: GPL v2 class SpotifyPlugin < Plugin + def initialize + super + + unless Object.const_defined?('Spotify') + raise 'Spotify module not found (lib_spotify plugin probably not enabled)' + end + end + def help(plugin, topic) _("spotify plugin - usage: spotify , spotify artist , spotify album ") end -- cgit v1.2.3