: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]+$/
},
}
- @autoadd_base = "#{@bot.botclass}/azgame/autoadd-"
+ @autoadd_base = datafile "autoadd-"
end
def initialize_wordlist(params)
if wc[word].key?(:when)
tr = _("%{word} learned from %{user} on %{date}") % {:word => word, :user => wc[word][:who], :date => wc[word][:when]}
else
- tr = _("%{word} learned from %{user}") % {:word => word, :user => wc[word][:who]}
+ tr = _("%{word} learned from %{user}") % {:word => word, :user => wc[word][:who]}
end
m.reply tr
- when :delete
+ when :delete
if pars.empty?
m.reply _("provide a word")
return
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