From d7efdf6ab7cdacdb7816935eac2e264a2ed3b4f6 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 23 Jul 2006 14:32:53 +0000 Subject: Urban requires rubyful_soup, gracefully disable the plugin if it can't be found --- data/rbot/plugins/urban.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'data') 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 -- cgit v1.2.3