Browse Source

added options to configure channel and player name regexes, ip obfuscation and default channel id.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
ecbf04d284
  1. 9
      pyweb/mumble/models.py
  2. 8
      template/mumble/mumble.htm

9
pyweb/mumble/models.py

@ -38,6 +38,10 @@ class Mumble( models.Model ):
bwidth = models.IntegerField( 'Bandwidth [Bps]', blank = True, null = True );
sslcrt = models.TextField( 'SSL Certificate', blank = True );
sslkey = models.TextField( 'SSL Key', blank = True );
obfsc = models.BooleanField( 'IP Obfuscation', default = False );
player = models.CharField( 'Player name regex', max_length=200, default=r'[-=\w\[\]\{\}\(\)\@\|\.]+' );
channel= models.CharField( 'Channel name regex', max_length=200, default=r'[ \-=\w\#\[\]\{\}\(\)\@\|]+' );
default= models.IntegerField( 'Default channel', default=0 );
booted = models.BooleanField( 'Boot Server', default = True );
def getDbusMeta( self ):
@ -80,6 +84,11 @@ class Mumble( models.Model ):
murmur.setConf( srvid, 'password', self.passwd );
murmur.setConf( srvid, 'certificate', self.sslcrt );
murmur.setConf( srvid, 'key', self.sslkey );
murmur.setConf( srvid, 'obfuscate', str(self.obfsc).lower() );
murmur.setConf( srvid, 'playername', self.player );
murmur.setConf( srvid, 'channelname', self.channel );
murmur.setConf( srvid, 'defaultchannel', str(self.default) );
if self.port is not None:
murmur.setConf( srvid, 'port', str(self.port) );

8
template/mumble/mumble.htm

@ -33,7 +33,7 @@
<input type="submit" />
</form>
{% else %}
<p>You need to be <a href="/accounts/login">logged in</a> to be able to register an account.</p>
<p>You need to be <a href="/accounts/login">logged in</a> to be able to register an account on this Mumble server.</p>
{% endif %}
</div>
@ -95,7 +95,7 @@
renderTo: 'col3_content',
layout: 'card',
id: 'mumble_container',
height: 400,
height: 510,
activeItem: 0,
border: false,
items: [ {
@ -104,9 +104,9 @@
defaults: { autoheight: true },
activeTab: {{ DisplayTab }},
items: [
{ contentEl: 'mumble_registration', title: 'Registration' },
{ contentEl: 'mumble_registration', title: 'Registration', autoScroll: true },
{% if CurrentUserIsAdmin %}
{ contentEl: 'mumble_admin', title: 'Administration' },
{ contentEl: 'mumble_admin', title: 'Administration', autoScroll: true },
{% endif %}
]
},

Loading…
Cancel
Save