diff options
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/factoids.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/data/rbot/plugins/factoids.rb b/data/rbot/plugins/factoids.rb index ca95d003..a66c0f52 100644 --- a/data/rbot/plugins/factoids.rb +++ b/data/rbot/plugins/factoids.rb @@ -187,7 +187,7 @@ class FactoidsPlugin < Plugin i = a.last m = r.match(f.to_s) if m - list << m[i] + list << m[i].downcase else list end @@ -301,6 +301,16 @@ class FactoidsPlugin < Plugin end end + def unreplied(m) + return if @factoids.empty? + return if @triggers.empty? + return unless m.message =~ /^(.*)\?\s*$/ + query = $1.strip.downcase + if @triggers.include?(query) + facts(m, :words => query) + end + end + def fact(m, params) fact = nil idx = 0 |