fixed bug in password
This commit is contained in:
parent
256ffd5b9d
commit
e386b9999a
1 changed files with 4 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
|||
# Password generation code by <TheNoodle>
|
||||
|
||||
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 <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"
|
||||
penis = ["penis", "mypenis", "dick", "mydick"]
|
||||
password = gen_password(inp)
|
||||
if inp in penis:
|
||||
return short
|
||||
notice(password)
|
||||
|
|
Reference in a new issue