From: Chris Gahan Date: Sat, 25 Feb 2006 20:57:43 +0000 (+0000) Subject: Some tweaks to the new Fact-about-anyone funcitonality. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=09ed05062cacc730335c2f8c3fa65270dc6d35c0;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git Some tweaks to the new Fact-about-anyone funcitonality. --- 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