From 1ff0b683756532ff07023a7c17529c6a32cd3e99 Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Sat, 24 Nov 2007 16:29:58 +0000 Subject: * (plugins/urban) filter urbandictionary suggestion via uniq() --- data/rbot/plugins/urban.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb index b8177e65..5aae26c6 100644 --- a/data/rbot/plugins/urban.rb +++ b/data/rbot/plugins/urban.rb @@ -35,7 +35,7 @@ class UrbanPlugin < Plugin return m.reply "#{Bold}#{word}#{Bold} not found" if rv.empty? if notfound - suggestions = rv.map { |s| "#{Underline}#{s[1]}#{Underline}" }.join(', ') + suggestions = rv.map { |s| Underline + s[1] + Underline }.uniq.join ', ' m.reply "#{Bold}#{word}#{Bold} not found. maybe you mean #{suggestions}?" return end -- cgit v1.2.3