From b5f47053f4e7bbda964947dfad86ee9929dcc1f3 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Sat, 16 Apr 2011 19:34:54 +0200 Subject: [PATCH] set registerhostname to plain display/bind address instead of addr:port. fixes #150 --- pyweb/mumble/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index 6cc0bad..e783a8c 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -279,8 +279,12 @@ class Mumble( models.Model ): else: self.ctl.setConf( self.srvid, 'port', '' ) - if self.netloc: - self.ctl.setConf( self.srvid, 'registerhostname', self.netloc ) + if self.display: + # if self.display contains a port, we're screwed here... + self.ctl.setConf( self.srvid, 'registerhostname', self.display ) + elif self.addr: + # If Murmur binds to multiple addresses, use the first + self.ctl.setConf( self.srvid, 'registerhostname', self.addr.split(" ")[0] ) else: self.ctl.setConf( self.srvid, 'registerhostname', '' )