From 4b71dc02e70e7df55fda47813f850d035cdf5b36 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Sun, 18 Aug 2013 12:26:39 +0200 Subject: azgame: catch scraping error --- data/rbot/plugins/games/azgame.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'data') diff --git a/data/rbot/plugins/games/azgame.rb b/data/rbot/plugins/games/azgame.rb index a19da43c..91caf35d 100644 --- a/data/rbot/plugins/games/azgame.rb +++ b/data/rbot/plugins/games/azgame.rb @@ -560,6 +560,7 @@ class AzGamePlugin < Plugin debug "getting random word from dictionary, matching #{random}" p = @bot.httputil.get(rules[:url] % CGI.escape(random)) debug p + raise 'unable to get search results' if not p.match /Search results for/i lemmi = Array.new good = rules[:good] # We look for a lemma composed by a single word and of length at least two -- cgit v1.2.3