diff options
author | Raine Virta <rane@kapsi.fi> | 2009-12-16 22:33:30 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-12-21 10:30:45 +0100 |
commit | b7fad38870b04450feafaf3e96ba4b3011816049 (patch) | |
tree | c54f6b8b1bf23a1b2b2bee14c485efcf202bd67a /data | |
parent | 682e7f1708b9534385467b3d707433cb256b6405 (diff) |
spotify: fail on load if Spotify module is not available
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/spotify.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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>, spotify artist <artist>, spotify album <album>") end |