diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-05 17:02:47 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-05 17:02:47 +0000 |
commit | 831bcdbf1e67075bd04ffc3c8ee71c22fe8714b0 (patch) | |
tree | 1903248a0393ffd75449622306280d2125c33aec /data | |
parent | 0ddcd43400c61d1dcdc07f1c5f6ec1a51714a3f1 (diff) |
factoids plugin: tell the user the index of the fact when refusing to learn something we know already
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/factoids.rb | 7 |
1 files changed, 5 insertions, 2 deletions
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 |