diff --git a/contrib/menu_login.py b/contrib/menu_login.py index d6ba94e0b1..6f7400690c 100644 --- a/contrib/menu_login.py +++ b/contrib/menu_login.py @@ -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" diff --git a/src/commands/default/unloggedin.py b/src/commands/default/unloggedin.py index aef0eea7be..0db44d09bf 100644 --- a/src/commands/default/unloggedin.py +++ b/src/commands/default/unloggedin.py @@ -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"