Browse Source

double check config fields, and substract -1 (server IDs start at 1)

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

8
pyweb/mumble/models.py

@ -235,9 +235,9 @@ class Mumble( models.Model ):
else: else:
self.name = conf["registername"]; self.name = conf["registername"];
defaultport = settings.MUMBLE_DEFAULT_PORT + self.srvid
defaultport = settings.MUMBLE_DEFAULT_PORT + self.srvid - 1
if "registerhostname" in conf:
if "registerhostname" in conf and conf["registerhostname"]:
if ':' in conf["registerhostname"]: if ':' in conf["registerhostname"]:
regname, regport = conf["registerhostname"].split(':') regname, regport = conf["registerhostname"].split(':')
regport = int(regport) regport = int(regport)
@ -248,12 +248,12 @@ class Mumble( models.Model ):
regname = None regname = None
regport = defaultport regport = defaultport
if "host" in conf:
if "host" in conf and conf["host"]:
addr = conf["host"] addr = conf["host"]
else: else:
addr = None addr = None
if "port" in conf:
if "port" in conf and conf["port"]:
self.port = int(conf["port"]) self.port = int(conf["port"])
else: else:
self.port = defaultport self.port = defaultport

Loading…
Cancel
Save