summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/chucknorris.rb
diff options
context:
space:
mode:
authorChris Gahan <chris@ill-logic.com>2006-02-25 20:57:43 +0000
committerChris Gahan <chris@ill-logic.com>2006-02-25 20:57:43 +0000
commit09ed05062cacc730335c2f8c3fa65270dc6d35c0 (patch)
treebde6fec87926bff1ce960fe2ddc2b5216e45552f /data/rbot/plugins/chucknorris.rb
parent037a917e382e5f80ffc7be5e94e614dbe08340e2 (diff)
Some tweaks to the new Fact-about-anyone funcitonality.
Diffstat (limited to 'data/rbot/plugins/chucknorris.rb')
-rw-r--r--data/rbot/plugins/chucknorris.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/data/rbot/plugins/chucknorris.rb b/data/rbot/plugins/chucknorris.rb
index 5c64de69..0b1b3a03 100644
--- a/data/rbot/plugins/chucknorris.rb
+++ b/data/rbot/plugins/chucknorris.rb
@@ -24,8 +24,16 @@ class ChuckNorrisPlugin < Plugin
end
# pick a random person
- if who == 'random'
- who = FACTMAP.keys[rand(FACTMAP.length)]
+ if who == 'random'
+ if substitute_name
+ # take out the Mr. T facts if you're inserting someone's name
+ # beacuse tons of them suck, and most of them revolve around
+ # "pitying" someone or something.
+ people = FACTMAP.keys - ["mrt"]
+ who = people[rand(people.length)]
+ else
+ who = FACTMAP.keys[rand(FACTMAP.length)]
+ end
end
# get the long name