Browse Source

add a bunch of new config variables (kudos to Natenom)

Natenom/support-murmur-13-1446181288462
Michael Ziegler 12 years ago
parent
commit
cf44ca00ac
  1. 13
      pyweb/mumble/forms.py
  2. 13
      pyweb/mumble/models.py

13
pyweb/mumble/forms.py

@ -116,6 +116,7 @@ class MumbleForm( PropertyModelForm ):
timeout = forms.IntegerField( required=False ) timeout = forms.IntegerField( required=False )
certreq = forms.BooleanField( required=False ) certreq = forms.BooleanField( required=False )
textlen = forms.IntegerField( required=False ) textlen = forms.IntegerField( required=False )
imglen = forms.IntegerField( required=False, help_text=_("In case of messages containing Base64 encoded images this overrides textmessagelength.") )
html = forms.BooleanField( required=False ) html = forms.BooleanField( required=False )
rememchn= forms.BooleanField( required=False, help_text=_( rememchn= forms.BooleanField( required=False, help_text=_(
"Remember the channel users were in when they quit, and automatically move them to " "Remember the channel users were in when they quit, and automatically move them to "
@ -123,6 +124,14 @@ class MumbleForm( PropertyModelForm ):
sgversion= forms.CharField( required=False ) sgversion= forms.CharField( required=False )
sgpositional = forms.BooleanField( required=False ) sgpositional = forms.BooleanField( required=False )
sgptt = forms.BooleanField( required=False ) sgptt = forms.BooleanField( required=False )
opusthres = forms.IntegerField( required=False, initial=100, help_text=_("Force Opus-Codec if this percentage of clients support it. Enter without % character.") )
reghostname = forms.CharField( required=False, help_text=_("Server hostname (domain name) that is used to connect to the server from the server list. This must be a A or AAAA record.") )
regpasswd = forms.CharField( required=False, help_text=_("Password used to register the server in the server list") )
regloc = forms.CharField( required=False, help_text=_("Location of the server as ISO_3166-1 country code. In order to work you must have a strong server certificate. Additionally the C= field of the used server certificate must have the same country code OR the used tld in registerhostname must contain the same location code FIXME schoen machen.") )
allowping = forms.BooleanField( required=False, initial=True, help_text=_("Allow ping packets from the server (to show usercount and slots in the server browser). This must not be disabled if the server should be listed in the serverlist.") )
sendversion = forms.BooleanField( required=False, initial=True, help_text=_("Allow server to send system version to the client.") )
def __init__( self, *args, **kwargs ): def __init__( self, *args, **kwargs ):
PropertyModelForm.__init__( self, *args, **kwargs ) PropertyModelForm.__init__( self, *args, **kwargs )
@ -158,13 +167,17 @@ class MumbleAdminForm( MumbleForm ):
users = forms.IntegerField( required=False ) users = forms.IntegerField( required=False )
usersperchannel = forms.IntegerField( required=False ) usersperchannel = forms.IntegerField( required=False )
channestlim = forms.IntegerField( required=False, help_text=_("Limit channel nesting to this level.") )
bwidth = forms.IntegerField( required=False ) bwidth = forms.IntegerField( required=False )
sslca = forms.CharField( required=False, widget=forms.Textarea, help_text=_("Can be a path or the file content in PEM format.") )
sslcrt = forms.CharField( required=False, widget=forms.Textarea ) sslcrt = forms.CharField( required=False, widget=forms.Textarea )
sslkey = forms.CharField( required=False, widget=forms.Textarea ) sslkey = forms.CharField( required=False, widget=forms.Textarea )
sslpass = forms.CharField( required=False, help_text=_("Key passphrase of the SSL certificate, if any.") )
booted = forms.BooleanField( required=False, initial=True ) booted = forms.BooleanField( required=False, initial=True )
autoboot = forms.BooleanField( required=False, initial=True ) autoboot = forms.BooleanField( required=False, initial=True )
bonjour = forms.BooleanField( required=False ) bonjour = forms.BooleanField( required=False )
class Meta: class Meta:
fields = None fields = None
exclude = None exclude = None

13
pyweb/mumble/models.py

@ -291,9 +291,8 @@ class Mumble( models.Model ):
defchan = mk_config_property( "defaultchannel", ugettext_noop("Default channel"), get_coerce=int ) defchan = mk_config_property( "defaultchannel", ugettext_noop("Default channel"), get_coerce=int )
timeout = mk_config_property( "timeout", ugettext_noop("Timeout"), get_coerce=int ) timeout = mk_config_property( "timeout", ugettext_noop("Timeout"), get_coerce=int )
textlen = mk_config_property( "textmessagelength", ugettext_noop("Maximum length of text messages") ) textlen = mk_config_property( "textmessagelength", ugettext_noop("Maximum length of text messages") )
imglen = mk_config_property( "imagemessagelength", ugettext_noop("Maximum length of text messages containing images") )
usersperchannel = mk_config_property( "usersperchannel",ugettext_noop("Users per channel"), get_coerce=int ) usersperchannel = mk_config_property( "usersperchannel",ugettext_noop("Users per channel"), get_coerce=int )
sgversion = mk_config_property( "suggestversion", ugettext_noop("Version to recommend") )
certreq = mk_config_bool_property( "certrequired", ugettext_noop("Require Certificate") ) certreq = mk_config_bool_property( "certrequired", ugettext_noop("Require Certificate") )
html = mk_config_bool_property( "allowhtml", ugettext_noop("Allow HTML to be used in messages") ) html = mk_config_bool_property( "allowhtml", ugettext_noop("Allow HTML to be used in messages") )
bonjour = mk_config_bool_property( "bonjour", ugettext_noop("Publish this server via Bonjour") ) bonjour = mk_config_bool_property( "bonjour", ugettext_noop("Publish this server via Bonjour") )
@ -301,6 +300,16 @@ class Mumble( models.Model ):
rememchn= mk_config_bool_property( "rememberchannel", ugettext_noop("Remember last channel") ) rememchn= mk_config_bool_property( "rememberchannel", ugettext_noop("Remember last channel") )
sgpositional= mk_config_bool_property( "suggestpositional", ugettext_noop("Suggest to use positional audio") ) sgpositional= mk_config_bool_property( "suggestpositional", ugettext_noop("Suggest to use positional audio") )
sgptt = mk_config_bool_property( "suggestpushtotalk", ugettext_noop("Suggest to use Push-To-Talk") ) sgptt = mk_config_bool_property( "suggestpushtotalk", ugettext_noop("Suggest to use Push-To-Talk") )
sgversion = mk_config_bool_property( "suggestversion", ugettext_noop("Suggest to use version") )
opusthres = mk_config_bool_property( "opusthreshold", ugettext_noop("Opusthreshold") )
channestlim = mk_config_bool_property( "channelnestinglimit", ugettext_noop("Channel nesting limit") )
regpasswd = mk_config_bool_property( "registerpassword", ugettext_noop("Registerpassword") )
regloc = mk_config_bool_property( "registerlocation", ugettext_noop("Serverlocation") )
allowping = mk_config_bool_property( "allowping", ugettext_noop("Allow ping packets") )
sendversion= mk_config_property( "sendversion", ugettext_noop("Allow to send system version") )
sslca = mk_config_property( "sslca", ugettext_noop("CA-Certificate") )
sslpass = mk_config_property( "sslpassphrase", ugettext_noop("Key passphrase") )
def get_absolute_url( self ): def get_absolute_url( self ):
from views import show from views import show

Loading…
Cancel
Save