From 831bcdbf1e67075bd04ffc3c8ee71c22fe8714b0 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 5 Nov 2007 17:02:47 +0000 Subject: factoids plugin: tell the user the index of the fact when refusing to learn something we know already --- data/rbot/plugins/factoids.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/factoids.rb b/data/rbot/plugins/factoids.rb index e50cc73d..37db9a4a 100644 --- a/data/rbot/plugins/factoids.rb +++ b/data/rbot/plugins/factoids.rb @@ -161,8 +161,11 @@ class FactoidsPlugin < Plugin :who => m.source.fullform, :where => m.channel.to_s ) - if @factoids.index(factoid) - m.reply _("I already know that %{factoid}" % { :factoid => factoid }) + if idx = @factoids.index(factoid) + m.reply _("I already know that %{factoid} [#%{idx}]" % { + :factoid => factoid, + :idx => idx + }) else @factoids << factoid @changed = true -- cgit v1.2.3