update password.py to be faster (and better (arrays!)), and add credit to lastfm.py
This commit is contained in:
parent
42b4d4951a
commit
256ffd5b9d
|
@ -1,3 +1,4 @@
|
||||||
|
# Upgraded with tables/cacheing by ChauffeR of #freebnc on irc.esper.net
|
||||||
from util import hook, http
|
from util import hook, http
|
||||||
|
|
||||||
@hook.command('l')
|
@hook.command('l')
|
||||||
|
|
|
@ -52,13 +52,10 @@ def gen_password(types):
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def password(inp, notice=None):
|
def password(inp, notice=None):
|
||||||
".password <length> [types] -- Generates a password of <legenth>. [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'"
|
".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'"
|
||||||
if inp == "penis":
|
short = "error: input too short"
|
||||||
return "error: unable to process request, input too short!"
|
penis = ["penis", "mypenis", "dick", "mydick"]
|
||||||
if inp == "mypenis":
|
password = gen_password(inp)
|
||||||
return "error: unable to process request, input too short!"
|
if inp in penis:
|
||||||
if inp == "dick":
|
return short
|
||||||
return "error: unable to process request, input too short!"
|
notice(password)
|
||||||
if inp == "mydick":
|
|
||||||
return "error: unable to process request, input too short!"
|
|
||||||
notice(gen_password(inp))
|
|
||||||
|
|
Reference in a new issue