From e386b9999ad90eab279fda0d42ee7ceab0d90143 Mon Sep 17 00:00:00 2001 From: neersighted Date: Thu, 1 Mar 2012 12:20:44 -0800 Subject: [PATCH] fixed bug in password --- plugins/password.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/password.py b/plugins/password.py index ba43a5d..08ea501 100755 --- a/plugins/password.py +++ b/plugins/password.py @@ -1,9 +1,9 @@ # Password generation code by - from util import hook import string import random + def gen_password(types): #Password Generator - The Noodle http://bowlofnoodles.net @@ -50,12 +50,13 @@ def gen_password(types): password = password + random.choice(okay) return password + @hook.command def password(inp, notice=None): - ".password [types] -- Generates a password of . [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'" + ".password [types] -- Generates a password of (default 10). [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'" + password = gen_password(inp) short = "error: input too short" penis = ["penis", "mypenis", "dick", "mydick"] - password = gen_password(inp) if inp in penis: return short notice(password)