]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
factoids plugin: actually output metadata in long form of Factoid#to_s
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 4 Nov 2007 20:37:02 +0000 (20:37 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 4 Nov 2007 20:37:02 +0000 (20:37 +0000)
data/rbot/plugins/factoids.rb

index 9d01a75a7c26765d7485b951d5424e75e82a5f43..f9c64eba987e2f161ddc346df9103167f9a4bb05 100644 (file)
@@ -28,14 +28,14 @@ class FactoidsPlugin < Plugin
       end
       meta = ""
       metadata = []
-      if fact[:who]
-        metadata << _("from %{who}" % fact.to_hash)
+      if @hash[:who]
+        metadata << _("from %{who}" % @hash)
       end
-      if fact[:when]
-        metadata << _("on %{when}" % fact.to_hash)
+      if @hash[:when]
+        metadata << _("on %{when}" % @hash)
       end
-      if fact[:where]
-        metadata << _("in %{where}" % fact.to_hash)
+      if @hash[:where]
+        metadata << _("in %{where}" % @hash)
       end
       unless metadata.empty?
         meta << _(" [learnt %{data}]" % {:data => metadata.join(" ")})