Browse Source

support multiple addresses to be entered in the address field

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
6ec7990c90
  1. 8
      pyweb/mumble/models.py

8
pyweb/mumble/models.py

@ -276,7 +276,11 @@ class Mumble( models.Model ):
self.ctl.setConf( self.srvid, 'registername', self.name ); self.ctl.setConf( self.srvid, 'registername', self.name );
if self.addr and self.addr != '0.0.0.0':
if self.addr:
if " " in self.addr:
# user gave multiple addresses, don't mess with that
self.ctl.setConf( self.srvid, 'host', self.addr );
else:
self.ctl.setConf( self.srvid, 'host', get_ipv46_str_by_name(self.addr) ); self.ctl.setConf( self.srvid, 'host', get_ipv46_str_by_name(self.addr) );
else: else:
self.ctl.setConf( self.srvid, 'host', '' ); self.ctl.setConf( self.srvid, 'host', '' );
@ -502,6 +506,8 @@ class Mumble( models.Model ):
return self.display; return self.display;
else: else:
daddr = self.display; daddr = self.display;
elif " " in self.addr:
daddr = self.addr.split(" ")[0];
else: else:
daddr = self.addr; daddr = self.addr;

Loading…
Cancel
Save