X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fgames%2Fazgame.rb;h=ca67881cb79424c3959ba89deb8eaf61a0e97d03;hb=d041e613c9562523587ae92803b7792cf31cbc84;hp=572684d912d68c1fc1d5ae2ea8faa16f666b3deb;hpb=783ffa4235330029d661752b1023db635b26f2b3;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/games/azgame.rb b/data/rbot/plugins/games/azgame.rb index 572684d9..ca67881c 100644 --- a/data/rbot/plugins/games/azgame.rb +++ b/data/rbot/plugins/games/azgame.rb @@ -145,7 +145,7 @@ class AzGamePlugin < Plugin :good => /(?:singular )?noun|verb|adj/, :first => 'abacus', :last => 'zuni', - :url => "http://www.chambersharrap.co.uk/chambers/features/chref/chref.py/main?query=%s&title=21st", + :url => "http://www.chambers.co.uk/search.php?query=%s&title=21st", :listener => /^[a-z]+$/ }, } @@ -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 /id="fullsearchresults"/i lemmi = Array.new good = rules[:good] # We look for a lemma composed by a single word and of length at least two