fixed bug in password

This commit is contained in:
neersighted 2012-03-01 12:20:44 -08:00
parent 256ffd5b9d
commit e386b9999a

View file

@ -1,9 +1,9 @@
# Password generation code by <TheNoodle> # Password generation code by <TheNoodle>
from util import hook from util import hook
import string import string
import random import random
def gen_password(types): def gen_password(types):
#Password Generator - The Noodle http://bowlofnoodles.net #Password Generator - The Noodle http://bowlofnoodles.net
@ -50,12 +50,13 @@ def gen_password(types):
password = password + random.choice(okay) password = password + random.choice(okay)
return password return password
@hook.command @hook.command
def password(inp, notice=None): def password(inp, notice=None):
".password <length> [types] -- Generates a password of <legnth>. [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'" ".password <legenth> [types] -- Generates a password of <legenth> (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" short = "error: input too short"
penis = ["penis", "mypenis", "dick", "mydick"] penis = ["penis", "mypenis", "dick", "mydick"]
password = gen_password(inp)
if inp in penis: if inp in penis:
return short return short
notice(password) notice(password)