Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:upTee/upTee

  • Loading branch information...
commit a08606c763b1826b8f8c9827ba384a5feb874bfe 2 parents 254168f + bd195e6
@Fisico Fisico authored
View
2  uptee/lib/twconfig.py
@@ -37,7 +37,7 @@ def read(self):
value += ',{0}'.format(selection)
elif widget[:7] == 'select:':
widget = 'text'
- self.options[command] = (value, widget)
+ self.options[command] = (value[:1000], widget)
self.tunes = [{'command': line.rsplit()[0].strip('"'), 'value': float(line.split()[1].strip('"'))} for line in tunes]
self.votes = [{'command': line.rsplit('" ', 1)[1].strip('"'), 'title': line.rsplit('" ', 1)[0].strip('"')} for line in votes if len(line.split('" ')) == 2]
for line in rcon_commands:
View
20 uptee/mod/migrations/0002_auto_20150207_1043.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('mod', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='option',
+ name='value',
+ field=models.CharField(max_length=1000, blank=True),
+ preserve_default=True,
+ ),
+ ]
View
2  uptee/mod/models.py
@@ -284,7 +284,7 @@ class Meta:
class Option(Config):
- value = models.CharField(blank=True, max_length=500)
+ value = models.CharField(blank=True, max_length=1000)
WIDGET_TEXT = 1
WIDGET_TEXTAREA = 2
View
1  uptee/mod/tasks.py
@@ -19,7 +19,6 @@ def run_server(path, server):
server.online = True
server.locked = False
server.save()
- p.wait()
@task()
View
6 uptee/mod/views.py
@@ -412,6 +412,8 @@ def update_settings(request, server_id):
if 'map_download_allowed' in post.keys():
del post['map_download_allowed']
for key in post.keys():
+ if not post[key]:
+ continue
if server.owner != request.user:
if not moderator.allowed_options.filter(command=key):
continue
@@ -434,6 +436,8 @@ def update_settings(request, server_id):
option.save()
options = server.config_options.filter(widget=Option.WIDGET_SELECT)
for key in post.keys():
+ if not post[key]:
+ continue
if server.owner != request.user:
if not moderator.allowed_options.filter(command=key):
continue
@@ -485,7 +489,7 @@ def update_votes(request, server_id):
other = 'title'
vars()[input_type] = post[key]
for _key in post:
- if not post[_key] and ' ' not in _key:
+ if not post[_key] or ' ' not in _key:
continue
if _key.rsplit(' ', 1)[-1] == 'new' and _key.split(' ', 1)[0] == other:
check_id = key.rsplit(' ', 2)[-2]
Please sign in to comment.
Something went wrong with that request. Please try again.