summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/chucknorris.rb
diff options
context:
space:
mode:
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