Fixed bans not being recognized

This commit is contained in:
delizin 2014-02-01 19:59:34 -05:00
parent 759fdea0d0
commit d136e6a1e2
2 changed files with 4 additions and 4 deletions

View file

@ -126,9 +126,9 @@ class CmdPasswordSelect(Command):
# before going on, check eventual bans
bans = ServerConfig.objects.conf("server_bans")
if bans and (any(tup[0]==player.name for tup in bans)
if bans and (any(tup[0]==player.name.lower() for tup in bans)
or
any(tup[2].match(self.caller.address[0]) for tup in bans if tup[2])):
any(tup[2].match(self.caller.address) for tup in bans if tup[2])):
# this is a banned IP or name!
string = "{rYou have been banned and cannot continue from here."
string += "\nIf you feel this ban is in error, please email an admin.{x"

View file

@ -82,9 +82,9 @@ class CmdUnconnectedConnect(MuxCommand):
# Check IP and/or name bans
bans = ServerConfig.objects.conf("server_bans")
if bans and (any(tup[0]==player.name for tup in bans)
if bans and (any(tup[0]==player.name.lower() for tup in bans)
or
any(tup[2].match(session.address[0]) for tup in bans if tup[2])):
any(tup[2].match(session.address) for tup in bans if tup[2])):
# this is a banned IP or name!
string = "{rYou have been banned and cannot continue from here."
string += "\nIf you feel this ban is in error, please email an admin.{x"