X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Ffactoids.rb;h=452efb98fef3fb8b7ff3eb2a3a69fc27f56d3383;hb=052217de30c59206d7025b582d4604557a747470;hp=ba6e88453b7d40ac11018400fc1614b5c335227a;hpb=edef2704ce1ea1f839ee03cc396cab8530de7046;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/factoids.rb b/data/rbot/plugins/factoids.rb index ba6e8845..452efb98 100644 --- a/data/rbot/plugins/factoids.rb +++ b/data/rbot/plugins/factoids.rb @@ -65,7 +65,7 @@ class FactoidsPlugin < Plugin def index(f) fact = f.to_s return if fact.empty? - self.map { |f| f[:fact] }.index(fact) + self.map { |fs| fs[:fact] }.index(fact) end def delete(f) @@ -260,7 +260,14 @@ class FactoidsPlugin < Plugin end def help(plugin, topic="") - _("factoids plugin: learn that , forget that , facts about ") + case plugin + when 'learn' + _("learn that => learn a factoid") + when 'forget' + _("forget fact <#num> => forget factoid number #num ; forget about => forget a factoid") + else + _("factoids plugin: learn that , forget that , facts about ") + end end def learn(m, params)