From 95cbfcc8c336678bd026f9b04b4e1981783a7bb5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 13 Feb 2008 01:34:34 +0100 Subject: factoids plugin: actually learn new keywords when learning new factoids --- data/rbot/plugins/factoids.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/rbot/plugins') diff --git a/data/rbot/plugins/factoids.rb b/data/rbot/plugins/factoids.rb index 128d6e42..c5f3a25c 100644 --- a/data/rbot/plugins/factoids.rb +++ b/data/rbot/plugins/factoids.rb @@ -270,7 +270,8 @@ class FactoidsPlugin < Plugin @factoids << factoid @changed = true m.reply _("okay, learned fact #%{num}: %{fact}" % { :num => @factoids.length, :fact => @factoids.last}) - parse_for_trigger(factoid) + trigs = parse_for_trigger(factoid) + @triggers |= trigs unless trigs.empty? end end -- cgit v1.2.3