Case sensitivity is better then derpy case-insensitivity

This commit is contained in:
Luke Rogers 2012-04-25 14:03:20 +12:00
parent 028b85a3ba
commit ec0eae4bf6
2 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ def admins(inp, notice=None, bot=None):
def addadmin(inp, notice=None, bot=None, config=None):
".addadmin <nick|host> -- Make <nick|host> an admin. " \
"(you can add multiple admins at once)"
targets = inp.lower().split()
targets = inp.split()
for target in targets:
if target in bot.config["admins"]:
notice("%s is already an admin." % target)
@ -38,7 +38,7 @@ def addadmin(inp, notice=None, bot=None, config=None):
def deladmin(inp, notice=None, bot=None, config=None):
".deladmin <nick|host> -- Make <nick|host> a non-admin." \
"(you can delete multiple admins at once)"
targets = inp.lower().split()
targets = inp.split()
for target in targets:
if target in bot.config["admins"]:
notice("%s is no longer an admin." % target)

View file

@ -32,8 +32,8 @@ def sieve_suite(bot, input, func, kind, args):
if args.get('adminonly', False):
admins = bot.config.get('admins', [])
if input.nick.lower() not in admins and input.mask.lower() not in admins:
if input.nick not in admins and input.mask not in admins:
input.notice("Sorry, you are not allowed to use this command.")
return None
return input
return input