summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-18 10:51:43 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-18 10:51:43 +0000
commit859f7344615d2d95195f6a07e528841f28ba9744 (patch)
treef2808b095d85f699e8a0122044e64e77426a5110
parent77529609e2c384071879d1c3f1f8288068bd247f (diff)
Minor optimization to Auth.random_password
-rw-r--r--lib/rbot/botuser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb
index 4e35e5f3..bed2b627 100644
--- a/lib/rbot/botuser.rb
+++ b/lib/rbot/botuser.rb
@@ -34,8 +34,8 @@ module Irc
#
def Auth.random_password(l=8)
pwd = ""
- 8.times do
- pwd += (rand(26) + (rand(2) == 0 ? 65 : 97) ).chr
+ l.times do
+ pwd << (rand(26) + (rand(2) == 0 ? 65 : 97) ).chr
end
return pwd
end