|
|
@ -15,6 +15,7 @@ |
|
|
|
""" |
|
|
|
|
|
|
|
import simplejson |
|
|
|
from urllib import urlopen |
|
|
|
from StringIO import StringIO |
|
|
|
from PIL import Image |
|
|
|
|
|
|
@ -165,6 +166,10 @@ def show( request, server ): |
|
|
|
if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'texture' and registered: |
|
|
|
textureform = MumbleTextureForm( request.POST, request.FILES ); |
|
|
|
if textureform.is_valid(): |
|
|
|
if 'usegravatar' in textureform.cleaned_data and textureform.cleaned_data['usegravatar'] and user.gravatar: |
|
|
|
gravatar = urlopen( user.gravatar256 ); |
|
|
|
user.setTexture( Image.open( gravatar ) ); |
|
|
|
elif 'texturefile' in request.FILES: |
|
|
|
user.setTexture( Image.open( request.FILES['texturefile'] ) ); |
|
|
|
return HttpResponseRedirect( reverse( show, kwargs={ 'server': int(server), } ) ); |
|
|
|
else: |
|
|
@ -175,7 +180,8 @@ def show( request, server ): |
|
|
|
textureform = None; |
|
|
|
|
|
|
|
if isAdmin: |
|
|
|
if request.method == 'POST' and 'mode' in request.POST and request.POST['mode'] == 'kick': |
|
|
|
if request.method == 'POST' and 'mode' in request.POST: |
|
|
|
if request.POST['mode'] == 'kick': |
|
|
|
kickform = MumbleKickForm( request.POST ); |
|
|
|
if kickform.is_valid(): |
|
|
|
if kickform.cleaned_data["ban"]: |
|
|
|