summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 14:32:53 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 14:32:53 +0000
commitd7efdf6ab7cdacdb7816935eac2e264a2ed3b4f6 (patch)
tree3f4ef44031f06460b12e151df8c5a3cf561bf70e
parentb7d2b095520d8951eb41ebd9c7794889169e5228 (diff)
Urban requires rubyful_soup, gracefully disable the plugin if it can't be found
-rw-r--r--data/rbot/plugins/urban.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb
index dd275e2d..d4af64a6 100644
--- a/data/rbot/plugins/urban.rb
+++ b/data/rbot/plugins/urban.rb
@@ -1,5 +1,12 @@
require 'cgi'
-require 'rubyful_soup'
+begin
+ require 'rubyful_soup'
+rescue
+ warning "could not load rubyful_soup, urban dictionary disabled"
+ warning "please get it from http://www.crummy.com/software/RubyfulSoup/"
+ warning "or install it via gem"
+ return
+end
require 'uri/common'
class UrbanPlugin < Plugin