Case sensitivity is better then derpy case-insensitivity
This commit is contained in:
parent
028b85a3ba
commit
ec0eae4bf6
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ def admins(inp, notice=None, bot=None):
|
||||||
def addadmin(inp, notice=None, bot=None, config=None):
|
def addadmin(inp, notice=None, bot=None, config=None):
|
||||||
".addadmin <nick|host> -- Make <nick|host> an admin. " \
|
".addadmin <nick|host> -- Make <nick|host> an admin. " \
|
||||||
"(you can add multiple admins at once)"
|
"(you can add multiple admins at once)"
|
||||||
targets = inp.lower().split()
|
targets = inp.split()
|
||||||
for target in targets:
|
for target in targets:
|
||||||
if target in bot.config["admins"]:
|
if target in bot.config["admins"]:
|
||||||
notice("%s is already an admin." % target)
|
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):
|
def deladmin(inp, notice=None, bot=None, config=None):
|
||||||
".deladmin <nick|host> -- Make <nick|host> a non-admin." \
|
".deladmin <nick|host> -- Make <nick|host> a non-admin." \
|
||||||
"(you can delete multiple admins at once)"
|
"(you can delete multiple admins at once)"
|
||||||
targets = inp.lower().split()
|
targets = inp.split()
|
||||||
for target in targets:
|
for target in targets:
|
||||||
if target in bot.config["admins"]:
|
if target in bot.config["admins"]:
|
||||||
notice("%s is no longer an admin." % target)
|
notice("%s is no longer an admin." % target)
|
||||||
|
|
|
@ -32,7 +32,7 @@ def sieve_suite(bot, input, func, kind, args):
|
||||||
if args.get('adminonly', False):
|
if args.get('adminonly', False):
|
||||||
admins = bot.config.get('admins', [])
|
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.")
|
input.notice("Sorry, you are not allowed to use this command.")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Reference in a new issue