lib/cinch/plugins/urbandict.rb in cinch-urbandict-1.0.4 vs lib/cinch/plugins/urbandict.rb in cinch-urbandict-1.0.5

- old
+ new

@@ -24,10 +24,11 @@ def get_def(term) # URI Encode term = URI.escape(term, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) # Check if it's not defined. - if Cinch::Toolbox.get_html_element(ud_url(term), '#not_defined_yet') + check = Cinch::Toolbox.get_html_element(ud_url(term), '.word') + if check && check == '¯\_(ツ)_/¯' return "Urban Dictionary ∴ #{term}: No definition available." end # Get the def ud_def(term)