|
|
@ -110,7 +110,10 @@ def register( request, server ): |
|
|
|
srv = Mumble.objects.get( id=server ); |
|
|
|
|
|
|
|
if request.user.is_authenticated(): |
|
|
|
try: |
|
|
|
reg = MumbleUser.objects.get( server=srv, owner=request.user ); |
|
|
|
except MumbleUser.DoesNotExist: |
|
|
|
reg = None; |
|
|
|
else: |
|
|
|
reg = None; |
|
|
|
|
|
|
@ -126,7 +129,10 @@ def savereg( request ): |
|
|
|
# raise Exception, "You need to be logged in to register yourself with Mumble."; |
|
|
|
|
|
|
|
srv = Mumble.objects.get( id=request.POST['id'] ); |
|
|
|
try: |
|
|
|
reg = MumbleUser.objects.get( server=srv, owner=request.user ); |
|
|
|
except MumbleUser.DoesNotExist: |
|
|
|
reg = None; |
|
|
|
|
|
|
|
if reg is None: |
|
|
|
reg = MumbleUser( name=request.POST['username'], password=request.POST['password'], server=srv, owner=request.user ); |
|
|
|