Browse Source

implemented auto port assignment - not such a clean way, but it should work. fixes #6

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
2f418fde89
  1. 6
      pyweb/mumble/models.py

6
pyweb/mumble/models.py

@ -117,6 +117,12 @@ class Mumble( models.Model ):
if self.id is None:
self.srvid = self.ctl.newServer();
if self.port is None:
self.port = max( [ mm.port for mm in Mumble.objects.all() ] ) + 1;
if self.port > 2**16:
self.port -= 30000;
self.ctl.setConf( self.srvid, 'host', socket.gethostbyname( self.addr ) );
self.ctl.setConf( self.srvid, 'registername', self.name );
self.ctl.setConf( self.srvid, 'registerurl', self.url );

Loading…
Cancel
Save