Merged. Still need to update some migrations.

This commit is contained in:
Griatch 2013-07-11 19:11:27 +02:00
commit c676c9965f
29 changed files with 821 additions and 401 deletions

View file

@ -606,9 +606,6 @@ class CmdQuell(MuxPlayerCommand):
Hierarchical permission quelling only work downwards, thus a Player cannot
use a higher-permission Character to escalate their permission level.
Use the unquell command to revert back to normal operation.
Note that the superuser character cannot be quelled. Use a separate
admin account for testing.
"""
key = "@quell"

View file

@ -4,7 +4,6 @@ Commands that are available from the connect screen.
import re
import traceback
from django.conf import settings
from django.contrib.auth.models import User
from src.players.models import PlayerDB
from src.objects.models import ObjectDB
from src.server.models import ServerConfig
@ -68,7 +67,7 @@ class CmdUnconnectedConnect(MuxCommand):
player = PlayerDB.objects.get_player_from_name(playername)
pswd = None
if player:
pswd = player.user.check_password(password)
pswd = player.check_password(password)
if not (player and pswd):
# No playername or password match
@ -142,7 +141,7 @@ class CmdUnconnectedCreate(MuxCommand):
return
# strip excessive spaces in playername
playername = re.sub(r"\s+", " ", playername).strip()
if PlayerDB.objects.filter(user__username__iexact=playername) or User.objects.filter(username__iexact=playername):
if PlayerDB.objects.filter(username__iexact=playername):
# player already exists (we also ignore capitalization here)
session.msg("Sorry, there is already a player with the name '%s'." % playername)
return