mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
Fixed bans not being recognized
This commit is contained in:
parent
759fdea0d0
commit
d136e6a1e2
2 changed files with 4 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue